We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I would like to change an audio file in my code but everytime an error occures, where with the previous file it works. All I do is change the name of the audiofile (both files are in the same folder and .wav). I suppose there is something wrong with the file, but I can't figure out how to fix this. I'm new to processing and have to work with someone elses code, unfortunately i don't have time to figure out processing or this code completely and I've been googling the error for a while, but still can't figure it out.. I'm sorry if this is a bit of a stupid question. Is there someone with a (simple) explanation? I work on a windows laptop, with processing 2.1.1. I use "Praat" to produce the .wav files. If this is not enough information to answer my question, please let me know. Thanks a lot!
Here's the code (all I changed was "green_stream" and "red_stream"):
String[] stimuli = {
"green_stream.wav",//0
"red_stream.wav",//1
and a bit further (I'm not sure this is relevant):
in = minim.loadSnippet("stimuli/"+stimuli[stimulus]);
meta = in.getMetaData();
stimulus_duration = meta.length();
soundLoaded = true;
This is the error:
==== JavaSound Minim Error ==== ==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 24 bit, mono, 3 bytes/frame, little-endian
=== Minim Error === === Couldn't load the file stimuli/red_stream.wav
Answers
Got it. All I had to do was update Java... Total noob. Never mind!