process EOF data
|Assigned to:||Aditya Bhatt||% Done:||
|Target version:||-||Estimated time:||4.00 hours|
Most functions in the Algorithms project do not process the last end-of-file (EOF) data block because it is less than some arbitrary buffer size. This generally happens in a line of code that looks like:
while(fread(smpls_in, 2, nsamples, instream) == nsamples)
Stream data will not always be a multiple of nsamples and the final fractional buffer read should be processed. This is easy to do with functions that operate on distinct samples. Block functions, such as the FFT, are a little trickier and should zero pad the remaining data. All data is important and should be processed.