![]() 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. </details> --------- Co-authored-by: Ivan Stepanov <ivanstepanovftw@gmail.com> Co-authored-by: François Mockers <francois.mockers@vleue.com> Co-authored-by: Jan Hohenheim <jan@hohenheim.ch> Co-authored-by: François Mockers <mockersf@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |