Incremental rendering
For a large audio file, update the view incrementally rather than all at once
Can use fading between updates if we will render each frame as a PNG:
UIImage * toImage = [UIImage imageNamed:@"myname.png"];
[UIView transitionWithView:self.view
duration:5.0f
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
self.imageView.image = toImage;
} completion:nil];
This is partially solved by Anton Tikhonov's commit 3fab424f675e7bbe8f4adbdc8aa840909212649e
See work from @simonbs and the new FDWaveformDelegate. We should add a method to show progress updates from incrementally rendering.
It should look like this
- (void)waveformView:(FDWaveformView *)waveformView
renderProgress(unsigned long int):progress;
This feature conflicts slightly with the current feature of incrementally adding resolution
So this is similar to the EZAudio audio recording project that could either show real time or rolling buffer display while recording audio from microphone? https://github.com/syedhali/EZAudio
No, live rendering will always be out of scope of this project (sans some hack) because we need to have the waveform in memory for zooming
Hi! I'm trying to render a waveform for a 1 hour track. Of course it takes a lot of time, so I was wondering how to implement the incremental update. Would you call your completionHandler at the end of each loop in the method "sliceAndDownsampleAsset" and then do as you suggested in your second comment? Thanks for your help ;)
This issue is blocked by consideration of #80. That may affect how we would be able to implement this.
This issue is now reopen for consideration.
Items include:
-
Chunking the input file and only loading parts of the file into memory at a time. This will require storing multiple waveforms, something we currently do not support.
-
Reporting the partial progress of a render operation as a callback.
Any progress on this feature? It would be a massive UX improvement. Thanks a lot!
No progress. This issue is in scope for the project. But it is "pull requests welcome" for the foreseeable future.