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.
IndexProgramming Questions & HelpSound,  Music Libraries › Issues with OSCp5 and sound
Page Index Toggle Pages: 1
Issues with OSCp5 and sound (Read 596 times)
Issues with OSCp5 and sound
Nov 3rd, 2008, 5:52pm
 
Hello,
I'm making a game in processing with a wiimote as controller.
I'm using darwiinremote to send data to processing via OSCp5. Everytime I try to initialize the Minim sound library I get this error message:

"=== Error opening SourceDataLine: Failed to allocate native stream."

I've also tried using the ESS sound library with no luck.
I am using mac. When I run the program on a PC the sound library works, so this seems to be a mac problem.
If anybody has any ideas or solutions how to solve this issue I would really appreciate it!

Thanks
/Jonas
Re: Issues with OSCp5 and sound
Reply #1 - Nov 4th, 2008, 3:05am
 
hi jonas,
just gave oscP5 and minim a try (osx 10.4, processing 154) - no problems here. where you able to successfully run minim by itself, without any other library? maybe issues with your java installation?
Re: Issues with OSCp5 and sound
Reply #2 - Nov 4th, 2008, 11:00am
 
Hi!

As I'm part of the same project as Jonas I'll chip in. We did try to run Minim stand alone and it worked.

We're gonna try updating Processing to 0154 and java and come back to you.

Thanks for the help!
Re: Issues with OSCp5 and sound
Reply #3 - Nov 4th, 2008, 1:16pm
 
Using 0154 didn't work either.

Trying with Ess yields the following error:

Code:

javax.sound.sampled.LineUnavailableException: Failed to allocate native stream.
at com.sun.media.sound.MixerSourceLine.implOpen(MixerSourceLine.java:254)
at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:107)
at krister.Ess.AudioChannel.setupLine(AudioChannel.java:619)
at krister.Ess.AudioChannel.loadSound(AudioChannel.java:318)
at krister.Ess.AudioChannel.loadSound(AudioChannel.java:208)
at krister.Ess.AudioChannel.<init>(AudioChannel.java:55)
at PP2_Project.setup(PP2_Project.java:84)
at processing.core.PApplet.handleDraw(PApplet.java:1372)
at processing.core.PApplet.run(PApplet.java:1300)
at java.lang.Thread.run(Thread.java:613)
Re: Issues with OSCp5 and sound
Reply #4 - Nov 4th, 2008, 2:15pm
 
If it's of any help, this is the osc code we're using:

Code:

void setupWiimote() {
// open an udp port for listening to incoming osc messages from darwiinremoteOSC
osc = new OscP5(this, 5600);

osc.plug(this, "ir", "/wii/irdata");
osc.plug(this, "connected", "/wii/connected");
osc.plug(this, "batterylevel", "/wii/batterylevel");
osc.plug(this, "buttonA", "/wii/button/a");
osc.plug(this, "buttonB", "/wii/button/b");

remoteAddress = "127.0.0.1";
remotePort = 5601;

ir = new float[12];
}
Re: Issues with OSCp5 and sound
Reply #5 - Nov 4th, 2008, 5:05pm
 
As it turns out, the reason for the errors was the bit format of the .wav files we were trying to play. We converted them to 16-bit and now it's working!

Thanks for all the help.
Page Index Toggle Pages: 1