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

Merged
merged 5 commits into from
May 3, 2025
Merged

Conversation

taj-holliday
Copy link
Contributor

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 ✨

@ickshonpe ickshonpe added C-Feature A new feature, making something new possible A-Audio Sounds playback and modification S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 29, 2025
@janhohenheim janhohenheim added the D-Trivial Nice and easy! A great choice to get started with Bevy label May 3, 2025
@mockersf mockersf enabled auto-merge May 3, 2025 09:22
@janhohenheim janhohenheim added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 3, 2025
@mockersf mockersf added this pull request to the merge queue May 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 3, 2025
@mockersf mockersf added this pull request to the merge queue May 3, 2025
Merged via the queue into bevyengine:main with commit 2affecd May 3, 2025
34 checks passed
@github-project-automation github-project-automation bot moved this to Done in Audio May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Audio Sounds playback and modification C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add support for seeking audio.
5 participants