We have problems playing audio files using JavaZoom’s libraries on OpenJDK in Linux, although it works perfectly on Sun JDK. Is there any workaround for this ‘Master Gain not supported’ exception?
Mohsen
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve noticed the same thing. I just check for Sun Java before trying to change the gain. Sucks, but on the bright side OpenJDK’s audio is performing much better than Sun’s for my needs.
EDIT: since others will find this answer through web searches, I’m going to add a bit. OpenJDK’s PulseAudioMixer does not appear to adhere to the JSAPI in some cases. For example, it insists that you stop() a line before flush()ing it. JSAPI however specifically says it’s legal to flush before stopping. Or in the case you mention, the pulse audio implementation claims to support gain when you call isControlSupported, but then throws an exception anyway. Those are two reasons JavaZoom code won’t work in OpenJDK. There are others. In some cases PulseAudioMixer isn’t to blame, it just takes a different route in undefined cases (e.g., what happens if you call write() on a line that isn’t open?!). I’m in the process of making some code I wrote more robust so it will run on OpenJDK.