hi, i got this error when i added the sound file stuff and i get this error: RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,3), Device or resource busy.
terminate called after throwing an instance of 'std::runtime_error' what(): RtApi::openStream: a non-NULL output StreamParameters structure cannot have an nChannels value less than one. Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting.
I don't know what is means so please help
this is the code:
import processing.sound.*; SoundFile file;
void setup() { size(800, 600); //fullScreen(1); keysIn = new ArrayList ();
myball = new Ball();
player1 = new Player(); player2 = new Player();
player1.PlayerY = height / 2; player2.PlayerY = height / 2;
player1.points = 0; player2.points = 0;
file = new SoundFile(this, "song.mp3"); // the song IS called song.mp3 file.play(); }
void draw() { background(0); println(keysIn);
myball.run();
myball.bounce(player1.PlayerY, player2.PlayerY);
player1.playerNo = 1; player1.run();
player2.playerNo = 2; player2.run();
player1.Decpoints(myball.ballX); player2.Decpoints(myball.ballX);
textSize(100); text(player1.points, 40, 100); text(player2.points, 40, 700); }
void keyTyped() { if (!keysIn.contains(key)) { keysIn.add(key); } }
void keyReleased() { if (keysIn.contains(key)) { keysIn.remove(new Character(key)); } }
if you want me to post the rest of the code (and 2 other tabs) please say so
PS: it worked before i added the sound file PPS: im in processing 3