Re: Need to information to implement a media player

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 2020-03-14 18:52, Emeric Poupon a écrit :
Hi!

I am implementing a headless media player. I have played a bit with
the pulseaudio client asynchronous API and I am able to play my files
with no problem, which is great.
However, I have some questions about pulse audio usage:

- is it OK to open a stream as soon as the application starts, even if
no sound will be eventually played? Or should I open a stream only
when a song is requested to be played and close it once it has
finished?

Can you enforce the same audio format throughout the application lifetime? It seems saner to keep the PA mainloop and the PA context for the whole application, but create a new stream only when you start playback. You can do either way though.

- is it OK to use a single stream for several songs or is it better to
use separate streams, one for each song?

You can of course do that. If you implement cross-fading, it's even hard to avoid. Remember to update the stream meta-data though.

I thought it may be easier to
use a single stream to implement gapless playback, but I may be wrong.

Yes.

--
Rémi Denis-Courmont
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux