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 › Ess: MP3 issues "Unable to load Sound" i
Page Index Toggle Pages: 1
Ess: MP3 issues "Unable to load Sound" i (Read 1247 times)
Ess: MP3 issues "Unable to load Sound" i
Aug 27th, 2008, 8:26pm
 
I have spent several hours tracking down issues with MP3's not loading via the export applet (both locally and remotely.)

I am running OS X 10.5.4 with both Safari and Firefox

I have tried referencing the MP3 via both AudioFile and AudioChannel.   Both work correctly in the IDE.   Once I export to an Applet, I get the "can not load sound."  I can see the binary is being embedded in the sketch's JAR based on the JAR size.   I have also tried loading via http reference, and local file, as well as signing my JAR file.  All work in IDE, but not in applet.

If I try with a WAV or AIF format it works in the applet (but then the JAR blows out to over 30 MB.)

The best i can figure is that the Tritonus.JAR is not compatible with the java applet runtime I have, and thus can not decode the MP3 correctly.  Can anyone confirm this?  

I am brand new to processing/java, so any help, work arounds, or more info would be greatly appreciated.

- Tom
Re: Ess: MP3 issues "Unable to load Sound&quo
Reply #1 - Aug 29th, 2008, 5:33pm
 
For others with the same struggle, I found that using the Minim library solved these issues (and bugs.)

Plus the Minim library was at a little higher level of abstraction and has really cool classes like BeatDetect.   Much easier than rolling my own and leaning the intricacies of Fourier transforms Smiley
Re: Ess: MP3 issues "Unable to load Sound&
Reply #2 - Sep 9th, 2008, 8:13am
 
It took me a while to figure this one out, but:

You can work around this by:
1) tritonus_share.jar (or whatever you're using) is in a folder called "code"
2) compiling the applet (and make sure tritonus_share.jar is in the applet folder, if not, paste a copy in there)
3) then editing the html file so that wherever it lists jar files, just type in an additional element to that list with "tritonus_share.jar". (i.e. at

<param name="archive" value="myprogram.jar, tritonus_share.jar">

4)Then also make sure that _all_ your jar files in the applet folder are signed (see the Ess page on signing applets)

Hopefully that does it...
Dan I
Re: Ess: MP3 issues "Unable to load Sound&quo
Reply #3 - Oct 23rd, 2008, 2:02pm
 
im getting the same "unable to load sound" error.

i placed my applet online and ive followed the instructions from the site to sign my applet and i also added the jar files to my list of jars to load.

still does not work..

any ideas?
Page Index Toggle Pages: 1