Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/audio/libs/snd_pcm_nonblock_mode.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/audio/libs/snd_pcm_nonblock_mode.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/audio/libs/snd_pcm_nonblock_mode.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/audio/libs/snd_pcm_nonblock_mode.html on line 8
Set or reset the blocking behavior of reads and writes to PCM channels
#include <sys/asoundlib.h>
int snd_pcm_nonblock_mode( snd_pcm_t *handle,
int nonblock );
- handle
- The handle for the PCM device, which you must have opened by calling
snd_pcm_open()
or
snd_pcm_open_preferred().
- nonblock
- If this argument is nonzero, non-blocking mode is in effect for subsequent
calls to
snd_pcm_read()
and
snd_pcm_write().
libasound.so
The snd_pcm_nonblock_mode() function sets up blocking (default) or
nonblocking behavior for a handle.
Blocking mode suspends the execution of the client application when
there's no room left in the buffer
it's writing to, or nothing left to read when reading.
In nonblocking mode, programs aren't suspended,
and the read and write functions
return immediately with the number of bytes that were read or written by the
driver.
When used in this way, don't try to use the entire buffer after the call;
instead, process the number of bytes returned and call the function again.
Zero on success, or a negative error code.
- -EBADF
- Invalid file descriptor. Your handle may be corrupt.
- -EINVAL
- Invalid handle.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
If possible, it is recommended that you design your application to call select on the PCM file
descriptor, instead of using this function. Asynchronously receiving notification from the
driver is much less CPU-intensive than polling it in a non-blocking loop.
snd_pcm_open(),
snd_pcm_open_preferred(),
snd_pcm_read(),
snd_pcm_write()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/audio/libs/snd_pcm_nonblock_mode.html on line 152
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/audio/libs/snd_pcm_nonblock_mode.html on line 152