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 › PSound, more than one WAV file
Page Index Toggle Pages: 1
PSound, more than one WAV file ? (Read 1069 times)
PSound, more than one WAV file ?
Sep 14th, 2005, 1:23pm
 
Hi

I can't play more than one wav file at once. I want to use PSound not sonia. One wav file works fine but when I start the programm with two wav files the first one is being played but not the other one and I get the message I posted below.

I need it because I want to play a background music and have tiny soundeffects over it. Is this possible?

Greetings
Marek


//Code:


PSound soundA;
PSound soundB;

void setup() {

 soundA = loadSound("test1.wav");
 soundA.loop();
 
 soundB = loadSound("test2.wav");
 soundB.loop();
 
 framerate(24);
 
}

void draw() {  
 println(soundB.time());
}






Error message:


Couldn't get gain control for this .wav file
Couldn't get gain control for this .wav file

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)
Re: PSound, more than one WAV file ?
Reply #1 - Sep 14th, 2005, 2:34pm
 
i'm not sure why this is breaking. a couple things to try:

- make sure you're using rev 92. there were some problems with this that were fixed in rev 88.

- if you're using the processing download that doesn't include java, try downloading the version that does and see if that changes anything.

- if none of that works, i've filed this as a bug in the bugs database. if you could zip your sketch folder up (tools -> archive sketch) and add that to the bug as an attachment, that would greatly speed progress of getting it fixed:
http://dev.processing.org/bugs/show_bug.cgi?id=152
Page Index Toggle Pages: 1