Sorry, I didn’t mention that readFromAudioReader is not available anymore. The AudioFormatReader read() is what you need. Just search the forum, there’s plenty of answers for this - here’s another thread:
I rewrote the code (but didn’t tested). Call read() and increment sourceStartSample in each iteration of processBlock by numReadSamples. Don’t forget to reset it when it goes to end, fill the rest of the outputBuffer with zeros when there’s not enough samples (or clear() at the beginning of iteration), etc.
AudioSampleBuffer outputBuffer;
String path = "someFile.wav";
int64 sourceStartSample = 0;
int numReadSamples = 512;
File soundFile = File(path);
AudioFormatManager manager;
manager.registerBasicFormats();
AudioFormatReader* reader = manager.createReaderFor(soundFile);
outputBuffer.setSize((int)reader->numChannels, (int)reader->lengthInSamples);
reader->read(&outputBuffer, 0, jmin((int)reader->lengthInSamples, numReadSamples), sourceStartSample, true, true);
Combine the FileChooser (from the tutorial) with this and you might get what you need.
Or you can implement it similary to how the SoundPlayer does.
About over engineering - one shouldn’t forget that JUCE is cross-platform and it doesn’t use any external libraries AFAIK.
