To be precise, I need to process files with a sample rate of 16kHz, 4 bytes/sample that can be 8 hours long, making files around 1.8GB in size.
All I need to do is read through the file to extract samples in chunks, to extract min and max values for plotting, but even reading the file, with no processing at all, takes over 10 seconds, with all of the time spent in the AudioFileReader.Read
method. Fiddling with the buffer size changes this a little, but not enough to make it possible to do the sampling fast enough for my use case, which is displaying the waveform in the UI in (more or less) real time.
Is there a way to read such a large file more quickly than by reading the whole thing into memory a chunk at a time? Or some entirely different way to solve this problem?