We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › Problems using PSound
Page Index Toggle Pages: 1
Problems using PSound (Read 1876 times)
Problems using PSound
May 7th, 2005, 2:10pm
 
I'm trying ot use PSound, to avoid having to make users download JSyn to use an applet, as all I want to do is have some sound effects play every now and then, unfortunately, trying to use it gives me this error:

Code:

java.lang.IllegalArgumentException: Unsupported control type: Master Gain
java.lang.IllegalArgumentException: Unsupported control type: Master Gain

at com.sun.media.sound.AbstractLine.getControl(Unknown Source)


That's from just using:
Code:

PSound gun;
...
gun=loadSound("shotgun.wav");
...
gun.play();
Re: Problems using PSound
Reply #1 - May 7th, 2005, 4:16pm
 
are you using java 1.5? that might cause the problem.

also, try re-saving the .wav file as a different type of wav file (different sample rate, uncompressed, whatever) and see if that fixes it. it seems that java doesn't like to play some .wav files.
Re: Problems using PSound
Reply #2 - May 7th, 2005, 4:20pm
 
also, the gain control is only needed if you're oging to set the volume, so rather than having your sketch die, i've just fixed it so that it can still run, it's just that you won't be able to use volume on it (until we figure out what's up).
Re: Problems using PSound
Reply #3 - May 7th, 2005, 8:08pm
 
I'd already had a problem with the WAV type, and had worked out to convvert it, that was the second error.

I think I probbaly ma using java 1.5 this time, because I wanted 87 withotu waiting for a whole new JVM to download . I'll have a fiddle and see if I can use the Java direcotry from a different processing..
Re: Problems using PSound
Reply #4 - May 8th, 2005, 4:22pm
 
try giving it a shot with 88, which has the fix/workaround.
Page Index Toggle Pages: 1