[pulseaudio-discuss] Sound complications

John Promersberger jpromersberger at hotmail.com
Tue Apr 19 18:48:05 UTC 2016


So due to complications with a required OS/HW migration, I have been forced to write a JNI that allows a Java UI to play sounds thru pulse audio.  Seems to work pretty well.


So I open a stream, write the sound to the stream.  When the user acknowledges the sound I destroy the stream, or the sound is to be interrupted by a more important sound, I destroy the stream and create a new stream for the new sound.


1.  Would it be improper to leave the stream open (for the entire length of time that my user interface is running) and not destroy it?  I would just write the new data to the existing stream.

2.  I only have a couple of sounds.  Ideally I would much prefer to upload my sounds as samples, but my sounds need to be looped if possible.  I don't think a sample cache will work for me because I don't see the ability to set a callback to let me know when a sample cache is done playing so that I can tell it to restart.  Please let me know if there is a way?


Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20160419/dc02fcdc/attachment.html>


More information about the pulseaudio-discuss mailing list