-
Notifications
You must be signed in to change notification settings - Fork 293
Implements Seek #513
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
Implements Seek #513
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
fafe4ba
seek implemented through SourceExt trait
yara-blue 023e833
request pos now uses mutable self
yara-blue 204a3f8
switch to fork for cpal
yara-blue d47842f
remove seek trait from source mods, added it to symphonia decoder, re…
745db82
removes SeekableSource adds failable try_seek to Source
202687b
adds try_seek for sink and all sources
1f3f36a
removes default try_seek impl, impl try_seek for decoders + refactors…
5b933d7
refactors seektest and adds more formats
961c3ef
Fix seeking for mix source
e1092f7
refactors seek test, now covers all decoders/formats
a3c55b8
fixes symphonia seek div by zero
d8a8be4
add seek for lewton
9a4dcb0
add can_seek method to source
eb22ec5
refactor tests, add seek beyond stream test
ebebe88
turns SeekNotSupported into a SeekError
5d44bfe
fixes symphonia seek beyond end of file returning an error
10262f8
removes can_seek in favor of rolling back seek operations (requires P…
8416210
adds test verifying correct seek position after seek
2b39d27
adds total_duration() impl to SymphoniaDecoder, makes seek saturating…
5de7383
finishes doc for sink::try_seek
f3a1966
symphonia throws error if duration is unknown and seek is beyond sour…
560961f
adds try_seek to spatial source
4237eff
revert to upstream non-seekable minimp3, comment out minimp3-seek sup…
3f4b530
Language and spelling fixes by @naglis
82bfa41
fixes seek in m4a files, fixes seeking having 1 second granularity
d1a809f
formats everything with cargo fmt
a24e0e6
speeds up correct_remaining_playtime test
724df4d
completely remove sink usage from seek tests
b26194d
make cargo fmt happy
963a484
refactors symphonia try_seek
c2c85e2
improve seek beyond end documentation
7357f19
remove commented out dead code in tests/seek.rs
8c77462
use From<f64> instead of custom `time_from_duration`
5dd4135
Remove duplicate doc section and fix spelling in docs
b7b5735
Merge branch 'master' into seek_runtime_err
50a781a
Merge branch 'master' into seek_runtime_err
57f2a3c
cargo fmt
470eba8
Merge branch 'master' into seek_runtime_err
4dea149
fixes spell errors in docs and SeekError
fb44f71
Fixes seek example and various spell/grammar issues
766fbbf
implement try_seek for SamplesBuffer
c60819e
seek tests finds beep in stereo test file
2e9d680
(seek/test) fixes duration calc in test
67612b5
(seek/test) adds failing test for seeking in exausted source
d0fce09
fix(seek) vorbis decoder crashing when seeking
9ae1c55
test(seek) add test for channel order
04c6957
test(seek) improve channel order test
1c82136
fix(seek) vorbis decoder now respects channel order
5562241
commit to save work on vorbis try_seek
80add81
removes seeking from vorbis decoder, can not be implemented
4e14b0a
Vorbis actually can be implemented since the sample rate is constant
3bafe32
refactor(seek) explain why seek to sample works
26e9db7
remove seek support for (lewton) vorbis
7eb13be
(tests) use rstest to refactor and expand seek test
f846cdf
fix(seek) hound(wav) now keeps channel order consistent
a52a41b
refactor(decoder/symphonia) logic reorderd
1fcf4b8
test(seek) made channel order more brittle
40a9447
refactor(decoder/sympthonia) use for loop instead loop + match & escape
6034af3
fix(decoder/symphonia) seek is no longer off
aa0880d
seek/error symphonia seekerror is now more precise
7cf0451
fix(seek/delay) seek < delay duration ate up the delay
6f1f44f
Merge branch 'master' into seek_runtime_err
34366fe
style clippy fixes
a4d167f
fix(seek) conditional compilation
b49b22a
Merge branch 'master' into seek_runtime_err
bbc8f00
update changelog
1ed1197
style, removes a needless clone()
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| use std::io::BufReader; | ||
| use std::time::Duration; | ||
|
|
||
| fn main() { | ||
| let (_stream, handle) = rodio::OutputStream::try_default().unwrap(); | ||
| let sink = rodio::Sink::try_new(&handle).unwrap(); | ||
|
|
||
| let file = std::fs::File::open("assets/music.mp3").unwrap(); | ||
| sink.append(rodio::Decoder::new(BufReader::new(file)).unwrap()); | ||
|
|
||
| std::thread::sleep(std::time::Duration::from_secs(2)); | ||
| sink.try_seek(Duration::from_secs(0)).unwrap(); | ||
|
|
||
| std::thread::sleep(std::time::Duration::from_secs(2)); | ||
| sink.try_seek(Duration::from_secs(4)).unwrap(); | ||
|
|
||
| sink.sleep_until_end(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.