[Previous] [Contents] [Next]

snd_pcm_channel_flush()

Flush buffers

Synopsis:

#include <sys/asoundlib.h>

int snd_pcm_channel_flush( snd_pcm_t * handle,
                           int channel );

Library:

libasound.so

Description:

The snd_pcm_channel_flush() function flushes the specified channel (playback or capture). This call waits until all data is processed (playback only) and then stops the transfer.

If the operation is successful (zero is returned), the driver state is changed to SND_PCM_STATUS_READY.

Returns:

Zero on success, or an error code.

Errors:

-EBADFD
The pcm device state isn't ready.
-EINTR
The driver isn't processing the data (Internal Error).
-EINVAL
Invalid handle.
-EIO
An invalid channel was specified, or the data wasn't all flushed.

Classification:

ALSA

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

snd_pcm_playback_drain(), snd_pcm_plugin_flush()


[Previous] [Contents] [Next]