framesToRead=16384;// <-- Keep this small because we're using 32-bit floats for calculating sample positions and I don't want to run out of precision with huge sample counts.
}
}
pSRC->linear.isPrevFramesLoaded = MAL_TRUE;
// Read Input Data
// ===============
floattBeg=pSRC->linear.t;
floattEnd=tBeg+(framesToRead*factor);
mal_uint32framesToReadFromClient=(mal_uint32)(tEnd)+1+1;// +1 to make tEnd 1-based and +1 because we always need to an extra sample for interpolation.
for (mal_uint32 i = 0; i < framesToReadFromClient; ++i) {
// At this point we have a bunch of frames that the client has given to us for processing. From this we can determine the maximum number of output frames
for (mal_uint32 iChannel = 0; iChannel < pSRC->config.channels; ++iChannel) {
// that can be processed from this input. We want to output as many samples as possible from our input data.