Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [alsa-devel] about pop chime on pcm api
@ 2019-08-30  8:31 Yang, Xiaotao (X.)
  2019-09-09 17:47 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Yang, Xiaotao (X.) @ 2019-08-30  8:31 UTC (permalink / raw)
  To: mailing list

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();
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [alsa-devel] about pop chime on pcm api
  2019-08-30  8:31 [alsa-devel] about pop chime on pcm api Yang, Xiaotao (X.)
@ 2019-09-09 17:47 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-09-09 17:47 UTC (permalink / raw)
  To: Yang, Xiaotao (X.); +Cc: mailing list

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
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30  8:31 [alsa-devel] about pop chime on pcm api Yang, Xiaotao (X.)
2019-09-09 17:47 ` Takashi Iwai

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org alsa-devel@archiver.kernel.org
	public-inbox-index alsa-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox