We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a folder of .wav files that are played sequentially by the sketch. This works fine, but after a while, the sound starts to gradually degrade until the sketch runs out of memory (as shown in VisualVM).
// Load the audio file sound = new FilePlayer(minim.loadFileStream(outputFilename + ".wav", 512, true)); // Patch the audio into minim sound.patch(mainOut); // Play the file sound.play();
The variable 'outputFilename' changes periodically, so it refers to a different sound file. There are about 45 of these, so I can't use the AudioSample class, which seems to be limited to a max of 30 files.
Can you recommend a good way of handling large amounts of small audio files, and how do you correctly clean up a file after its use?