Skip to content

Audio sink seek adopted #18971

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

taj-holliday
Copy link

Adopted #13869

Objective

Fixes #9076

Solution

Using rodio's try_seek

Testing

@ivanstepanovftw added a seek system using AudioSink to the audio_control.rs example. I got it working with .mp3 files, but rodio doesn't support seeking for .ogg and .flac files, so I removed it from the commit (since the assets folder only has .ogg files). Another thing to note is that try_seek fails when using PlaybackMode::Loop, as rodio::source::buffered::Buffered doesn't support try_seek. I haven't tested SpatialAudioSink.

Notes

I copied the docs for try_seek verbatim from rodio, and re-exported rodio::source::SeekError. I'm not completely confident in those decisions, please let me know if I'm doing anything wrong.

Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for seeking audio.
2 participants