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 & HelpPrograms › Pb displaying in a browser applets using minim
Page Index Toggle Pages: 1
Pb displaying in a browser applets using minim (Read 1354 times)
Pb displaying in a browser applets using minim
Jul 1st, 2009, 5:20pm
 
Hello,

I have a problem with a serie of 8 internet pages,
each including a different signet applet.

Each applet uses Minim Libray for analysing mp3 or mic input.
The weight of each is between 2 and 5.5 mo.

The first time I launch a page, the applet loads, but when I try to open another one, nothing happends. (Fo the moment I just tried on Mac Safari and Firefox).

I assume it is a matter of memory or cache but I don't know what I've done wrong.

I used in my sketch a void stop for closing the player, the library and so but it seems not to be enough.

Has anybody an idea ?

Thanks in advance.





Re: Pb displaying in a browser applets using minim
Reply #1 - Jul 2nd, 2009, 6:28pm
 
Hello,

I get this message error:

Code:
=== Minim Error ===
=== Couldn't load the file 02_deep_roots.mp3

Exception in thread "Animation Thread" java.lang.NullPointerException
at deep_roots_02.setup(deep_roots_02.java:390)
at processing.core.PApplet.handleDraw(PApplet.java:1383)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at deep_roots_02.stop(deep_roots_02.java:88)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - MPEG2L3 22050.0 Hz, unknown bits per sample, stereo, unknown frame size, 38.28125 frames/second,


Is the issue a matter of frameRate ?
Re: Pb displaying in a browser applets using minim
Reply #2 - Jul 2nd, 2009, 10:55pm
 
Is the sound playing in the PDE, ie. when not an applet?
Re: Pb displaying in a browser applets using minim
Reply #3 - Jul 3rd, 2009, 3:23am
 
The applet works well individualy in running mode.

I conceived a large application as well including the 8 soundtracks and everything seem to be ok, mainly the transition between each part.

The first called internet page displays indeed the applet (I tried one by one, re-launching the browser each time) but the following displays depend on a logic I can't understand for the moment.

Perhaps my applet problem is just the clue of a minor issue in each sketch.

I'm going to have an elaborate look at the paramaters of Minim Library focusing on the sample rate,
nevertheless, if someone could give me a direction, I will be grateful.
Re: Pb displaying in a browser applets using minim
Reply #4 - Jul 3rd, 2009, 3:30am
 
There might be a problem with running several instances of Minim in the same environment (browser). I fear my knowledge stops there.

You plan to share this application on a site? Because if the application is for your own usage, I don't see why you load the frames as applets.
Re: Pb displaying in a browser applets using minim
Reply #5 - Jul 3rd, 2009, 4:22am
 
Thanks PhiLho.

The app will be useful for the artist I collaborate with; for his live concert (so Audio Input) or for exhibition (so load .aiff)
The applet will be goodies I proposed for the mini-website; just for the joy of users.

Indeed, the pb should come from the call of Minim; I tried to disallow the cache, I tried to override the void stop with javascript, without success.

I'm currently changing the logAverages parameters; it seems returning less Java error. I'm crossing fingers :)


That's just my second artwork with Processing. I've probably done a very basic mistake.
Re: Pb displaying in a browser applets using minim
Reply #6 - Jul 3rd, 2009, 4:43am
 
I'm going to post in Sound, Music Libraries category; it should be a better place to expose my problem.
Page Index Toggle Pages: 1