We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I have a Processing2 application that works fine on my PC. When I tried it on a spare machine I got multiple Minim errors. This appears to be because the spare machine (Windows7) has no Speakers or Headphones plugged-in i.e. no playback device. When I plug in headphones all of the errors disappear and the code runs as normal.
Does anyone know of a simple way to detect the lack of playback device from within the code? I could then use this to skip the sound-related commands for any machine that has no sound.
Many thanks,
Batroost
Answers
Maybe you should check whether some Minim related variable got
null
? :-/http://processing.org/reference/null.html
Yes, that would help. The errors in the console start with:
So, I'm guessing that this is the one I need to trap. Not sure where to go from here?
Fixed it - thanks for the hint. Simply used the following before the loading the sounds, and check the flag HasSound before allowing teh code to play any sound:
etc...