Problem with minim library. Error in run example file (RecordAndPlayback.pde)

I am a new to processing. I'm trying to create an application to record sound during experiment and I have found an example that seems to work for me.

The program works fine until the phase in which it has to save the recording audio, giving this error message: Any hints?

 ==== JavaSound Minim Error ====
==== You must stop recording before you can write to a file.

Exception in thread "Animation Thread" java.lang.NullPointerException
    at ddf.minim.javasound.JSMinim.getAudioInputStream(JSMinim.java:607)
    at ddf.minim.javasound.JSBufferedSampleRecorder.save(JSBufferedSampleRecorder.java:172)
    at ddf.minim.AudioRecorder.save(AudioRecorder.java:109)
    at prova_record2.keyReleased(prova_record2.java:124)
    at processing.core.PApplet.handleKeyEvent(PApplet.java:2000)
    at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1979)
    at processing.core.PApplet.handleDraw(PApplet.java:1643)
    at processing.core.PApplet.run(PApplet.java:1530)
    at java.lang.Thread.run(Thread.java:680)

Thank you for your attention.

stefano

Tagged:

Answers

  • Answer ✓

    Looks like the hint is in the error message itself, no? Stop recording before saving the file.

Sign In or Register to comment.