-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java Sound Minim Error when loading multiple files into audioPlayer #104
Comments
Also receiving the same error after trying to save() 5 audio files sequentially with AudioRecorder. |
This sounds like the same thing as Issue #78 . Try grabbing the jar files from here and replacing the installed version you are using in Processing: https://github.com/ddf/Minim/tree/master/library For AudioRecorder, you must call close() on the object returned by save(). The method saves the audio to disk and then immediately opens and returns a stream you can play, but this was a poor design decision in hindsight. |
Hmm, well I was actauly able to bypass the issue by switching all of my AudioPlayers to FilePlayers. Or rather, I only ever had one of either and was continuously loading new files into it. Switching to FilePlayer and un/patching(out) before and after every new fileLoad seemed to get past the JavaSound Minim Error. But now I'll be on the look out for the #78 memory leak error. So I'm not sure that this issue is actually related to #78. |
Ok, good to know, we'll keep this open. |
I am getting this too - a sound toy with 32 'tracks' like a drum machine - each has a dedicated audioplayer on a single minim instance (all populated in setup). Loads 31 files and fails on the 32nd one (even if I swap the order around) and get a null pointer exception when I try to play any of them... Same null pointer behaviour when running your examples so not code or file specific (and it all works using Processing.sound until the audio goes to hell after 10 min or so). OP behaviour suggests a memory issue? Null pointer suggests a version issue on a dependent library? |
==== JavaSound Minim Error ==== ==== JavaSound Minim Error ==== ==== JavaSound Minim Error ==== pressed |
The 3 files are commercial samples in WAV format and are working in Processing using processing.sound. JRE at C:\Program Files (x86)\Java\jre1.8.0_311\ . I looked for libpulse-java.so and pulse-java.jar and sound.properties as per https://importgeek.wordpress.com/tag/little-endian-not-supported/ . Was wondering if they are part of the JDK (which I do not have) rather than JRE? Just tried to install JDK now and that did not fix the issue. Unfortunately Java is not a language I ever plan to use (outside of Processing and Minim, both of which I plan to use a lot) :-) |
I’ve got some Processing code that cycles through a folder of audio files and plays them with minim. I’m using the following that gets called in draw to check when one file is done and start the next. This is on Raspberry Pi.
if(!player.isPlaying() && !inputing && index < lovequestions.length) { player.close(); player = minim.loadFile(language + "/love/questions/" + lovequestions[index]); delay(100); player.play(); index++; println("Index: " + index); }
But after about 9 tracks I get the following error. Sometimes its a few tracks less, sometimes a few more. I know that it is not related to the audio files themselves because they all will play individually, its in trying to play multiple files in sequence that I get the error.
`
==== JavaSound Minim Error ====
==== Couldn't open the line: line with format PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.
=== Minim Error ===
=== Couldn't load the file elevator2.wav
`
The text was updated successfully, but these errors were encountered: