I am using ALSA API snd_pcm_drop()
to clear the buffers. But when I continue audio later with snd_pcm_prepare()
, I can hear part of previous audio which was supposed to be cleared.
This happens when I have a high value of snd_pcm_sw_params_set_stop_threshold()
. If I am using a lower value, the partial audio from previous audio session wont be played.
What is happening here ? How to clear off the buffer completely ?
(I am new to ALSA)
Thanks
I solved the same issue in this way:
snd_pcm_prepare(pcm_handle);
snd_pcm_drop(pcm_handle);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With