-
-
Notifications
You must be signed in to change notification settings - Fork 69
Audio file incremental reading #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
79a094d
to
367f404
Compare
367f404
to
2873c97
Compare
Looks nice. I prepped a way to benchmark the performance over the commits, to see where we loose and if we accept it (also for performance-impacting things in develop such as the smoothers, voice stealing, etc). I don't know if you've checked the benchmarks I made for this before, comparing reading at once with reading in chunks. This is for a wav file (disregard the "AllocInside" it does not matter).
and this is for a flac file
For FLAC you do take a substantial hit, but if it takes 10 times longer to load overall but you miss no deadlines on the way it might be OK. |
It's a dumb program which I made before for quick comparisons. I didn't take time to turn this into a proper benchmark. Regardless, the conclusion is like you said, flac takes a hit. For the actual benchmark, I wished a program that will pre-convert the reference flac into all formats, and it will derive it into a benchmark of all formats. (but explicitly skip reverse ogg, this one takes minutes) |
Below the benchmarks. Also perhaps sine wave files don't have best properties when it comes to evaluating compressed files, I didn't really check this aspect of thing currently. Backward ogg removed because it's extremely slow.
|
I'll run some file loading benchmarks "live". |
The benchmarks looked OK but I forgot to post them before leaving. I think we could merge this and give it some runtime until the next point release. |
Sure let's merge it. |
This supports incremental file loading. The
availableFrames
will be incremented as the file is being read.Reading and oversampling operations are going to be processed in turns, on the basis of 1024 frames segments.
This supports 3 reading strategies
This allows long files to played, improving the ogg playback ability in particular, but there can be still trouble in the high frequency range. An increased preload size helps a lot, but it can still be a miss even at the highest setting, starting at octaves ~ 6-7.