Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Beginner who is desperate for help! Audio keeps crashing

$
0
0

Im completely new to processing and am in a desperate need for help.. Each time I click my mouse, the sound file doesnt not play and it all crashes; with a error stating :

Error: Soundfile doesn't exist. Pleae check path java.lang.NullPointerException at processing.sound.SoundFile.channels(Unknown Source) at processing.sound.SoundFile.play(Unknown Source) at POSSIBLYNEEDSSOUND.mousePressed(POSSIBLYNEEDSSOUND.java:79) at processing.core.PApplet.mousePressed(PApplet.java:2759) at processing.core.PApplet.handleMouseEvent(PApplet.java:2692) at processing.core.PApplet.dequeueEvents(PApplet.java:2609) at processing.core.PApplet.handleDraw(PApplet.java:2450) at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)

If someone can please help that would be greatly appreciate. Thanks

import processing.sound.*;

SoundFile tone;

void setup(){ size(1300,1300); noFill(); background(0); smooth();

tone = new SoundFile(this, "sample.mp3");

}

void mousePressed(){

tone = new SoundFile(this, "sample.mp3");

//tone.play();

}

void mouseReleased(){

//tone.stop();

}


Viewing all articles
Browse latest Browse all 2896

Trending Articles