-
Notifications
You must be signed in to change notification settings - Fork 240
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
skip_duration is unusably slow #443
Comments
I suspect that because the skip_duration effect sits on top of what is essentially an iterator of audio samples it cannot directly jump forwards to where it needs to be... |
It should be possible to implement fast duration skipping at least with lewton: decoding is a choice for the users. |
Absolutely, I think though that the Source trait would need to expose some sort of explicit skip frame function, so that the underlying file readers can safely jump through the audio file without attempting to decode the audio along the way... |
My solution to this was making my own |
Calling
skip_duration
on a source seems to block the thread for a completely unacceptable amount of time (several seconds, often double-digit). My guess is that this is due to how skipping is implemented where the source is manually stepped forward frame-by-frame until the offset is reached. Is is possible that the source could instead be indexed to reach the correct offset directly? I feel this should be possible, at least with sources that are constant in sample rate (or rather, sources that already usedo_skip_duration_unchecked
).The text was updated successfully, but these errors were encountered: