View Single Post
Old 09-15-2014, 11:47 PM   #2
Human being with feelings
bozmillar's Avatar
Join Date: Sep 2009
Posts: 593

I would just load the wave files directly into memory. I think direct from disk streaming is losing value now that 64 bit is taking over. You can save it as an array of floats so that you don't have to bother scaling each sample from short int.

Also, I'd resample to match the sample rate when you load it, that way you don't have to resample on the fly so you can do more expensive interpolation without taking a CPU hit.

When it comes time to play a sample, just go through each index one at a time and spit it out to the output.
bozmillar is offline   Reply With Quote