<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div dir="ltr" data-setdir="false">Hi!</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">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.</div><div dir="ltr" data-setdir="false">However, I have some questions about pulse audio usage:<br></div><div dir="ltr" data-setdir="false">- 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?</div><div dir="ltr" data-setdir="false">- is it OK to use a single stream for several songs or is it better to use separate streams, one for each song? I thought it may be easier to use a single stream to implement gapless playback, but I may be wrong.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Thanks for your help.</div></div></body></html>