I know how load an entire file into an audioBuffer. But is there a way to get say 5-10 seconds worth from a given point.
I basically have an audio playback component which works great with upto 10 mins worth but I want to be effiecient with ram for larger files.
int lentoread = 44100;
int positiontostartreadingfrom = 100*44100;
reader->read(buffer, 0, lentoread, positiontostartreadingfrom , true, true);
“reader” is assumed to be an AudioFormatReader and “buffer” an AudioBuffer.
daniel
3
Yeah, if he wants to stream the audio from disk. But it wasn’t clear from the original post if he wants to do that or not.
daniel
5
Yes, was just meant as additional option… your solution is the least invasive!
Awesome. I thought there would be something like that.
Cheers for quick response.