My problem is, when running this program, after some time I am getting this error.
java.lang.RuntimeException: unable to prepare stream
at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.close(PulseAudioDataLine.java:309)
at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.close(PulseAudioSourceDataLine.java:333)
at ddf.minim.javasound.JSBaseAudioRecordingStream.run(JSBaseAudioRecordingStream.java:159)
at java.lang.Thread.run(Thread.java:662)
Is this due to loading the files from draw(), Is there any solution?