[alsa-devel] about pop chime on pcm api
![](https://secure.gravatar.com/avatar/8503ae7af26b5df8a5aa0f38adafd137.jpg?s=120&d=mm&r=g)
Hi: Why should I call api<snd_pcm_close()> between the interval if I want to play a wav file two times repeatly, Otherwise pop chime occurs?
Eg: (fake code as follows): Following codes works good. Pcm.open();//open pcm device Pcm.play(demo.wav);//set parameter and call snd_pcm_writei() to play Pcm.close();//close pcm device Pcm.open(); Pcm.play(demo.wav); Pcm.close();
But following codes works with pop chime Pcm.open(); Pcm.play(demo.wav); Pcm.play(demo.wav); Pcm.close();
![](https://secure.gravatar.com/avatar/5b19e9d0e834ea10ef75803718ad564b.jpg?s=120&d=mm&r=g)
On Fri, 30 Aug 2019 10:31:25 +0200, Yang, Xiaotao (X.) wrote:
Hi: Why should I call api<snd_pcm_close()> between the interval if I want to play a wav file two times repeatly, Otherwise pop chime occurs?
Eg: (fake code as follows): Following codes works good. Pcm.open();//open pcm device Pcm.play(demo.wav);//set parameter and call snd_pcm_writei() to play Pcm.close();//close pcm device Pcm.open(); Pcm.play(demo.wav); Pcm.close();
But following codes works with pop chime Pcm.open(); Pcm.play(demo.wav); Pcm.play(demo.wav); Pcm.close();
It's not clear what "pop chime" means, so a bit hard to answer.
If the pop chime means some clicking noise, it shouldn't be a problem in the second case, either. It's more likely some issues in the application side.
Takashi
Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (2)
-
Takashi Iwai
-
Yang, Xiaotao (X.)