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