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 & HelpSyntax Questions › dealing with files that minim can't play
Page Index Toggle Pages: 1
dealing with files that minim can't play (Read 649 times)
dealing with files that minim can't play
Mar 24th, 2010, 11:06am
 
hiya, i'm using minim to try and play unprepared files from my computer (e.g. i don't know if they're compatible with minim etc.) but if the filename is wrong or minim can't play the file when you call loadFile, rather than throwing an exception (the sensible thing to do) there's an null pointer and the applet stops dead. is there any way to get round this? am i missing something obvious?

cheers,

rob
Re: dealing with files that minim can't play
Reply #1 - Mar 24th, 2010, 2:52pm
 
so given this (from an example), what exactly is happening?

player = minim.loadFile("groove.mp3", 2048);

does this line throw a null pointer exception? (in which case put a try catch around it) or is it setting player to null? (in which case check for it before you use player)
Re: dealing with files that minim can't play
Reply #2 - Mar 24th, 2010, 6:33pm
 
ah, a NullPointerException is thrown after all. whoops!
cheers!

rob
Page Index Toggle Pages: 1