Skip to contentSkip to conversation

snd_pcm_wait function

DISCUSSION Enno Fennema 2 participants 2 messages Nov 10, 2012

lore
Share & tools
lore
#0 lore raw

The documentation says this functions waits for the pcm to become ready for I/O. I am not sure what ready means in this context.

I assume entering the PREPARED state. Is that correct?

Is there a function to wait for entering the SETUP state. In particular I would like to wait for pcm_snd_drain to finish.

Appreciate any help.

Enno Fennema

#1 lore raw
Quoted 2 lines · Enno Fennema

The documentation says this functions waits for the pcm to become ready for I/O. I am not sure what ready means in this context.

Ready for playback/capture, i.e., some frames are available.

Quoted 2 lines

Is there a function to wait for entering the SETUP state. In particular I would like to wait for pcm_snd_drain to finish.

This is not possible. alsa-lib is not thread-safe, so while another thread is executing snd_pcm_drain, you cannot access the same PCM device. Let the other thread send a message after snd_pcm_drain has finished.

Regards,
Clemens