Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Sound sinks not closed on finish. #21
To reproduce, load in a sound, and click the play button. On newer versions of Ubuntu, the sink can be observed by visiting Sound Settings (accessible from the sound applet indicator) > Applications. Observe that the sink appears and never goes away. Furthermore, the sink is not recycled - clicking play again opens a new sink.
The java sound demo doesn't exhibit this behavior. http://java.sun.com/products/java-media/sound/samples/JavaSoundDemo
Notice that terminating the JVM will cause these sinks to automatically close.
I wasn't able to reproduce this very well versus Java Sound Demo (basically, I can't confirm that Java Sound Demo doesn't exhibit this behavior), but I am able to confirm that the sinks are left open, which is enough to implement a solution.
Resolved in 3ce031b on the JoshEdit branch by draining the sink instead of looping until !isAvailable.