Open Sound System
|Do you have problems with sound/audio application development? Don't panic! Click here for help!|
All OSS system calls follow the familiar Posix/Unix semantics. Please look at the standard manual page (
man write) for more informtion. This section will only explain some OSS related details. The error codes returned by OSS as well as their meaning will be described in the Possible error codes (errno) returned by OSS calls section.
OSS supports non-blocking I/O on audio devices. Programmers who use this feature should be familiar with the strange behaviour of read in this mode.
If the application doesn't want to block then it's better to use The select() and poll() system calls together with the device specific ioctl calls instead of using non-blocking mode. This is much easier way to do the same job.
In most cases the best approach is to let writes to block. There is no need to avoid blocking unless it makes the application unresponsive. In particular non-blockiong I/O must not be used if it results in use of nasty wait methods. Blocking reads and writes will do the same automatically with superior performance and without any unnecessary problems.