mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 06:04:16 +00:00
Fixes seek example and various spell/grammar issues
Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
This commit is contained in:
parent
4dea149dc2
commit
fb44f71dc9
4 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@ fn main() {
|
|||
let (_stream, handle) = rodio::OutputStream::try_default().unwrap();
|
||||
let sink = rodio::Sink::try_new(&handle).unwrap();
|
||||
|
||||
let file = std::fs::File::open("examples/music.mp3").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));
|
||||
|
|
|
@ -28,12 +28,12 @@ where
|
|||
}
|
||||
// let mut decoder = SeekDecoder::new(data)
|
||||
let mut decoder = Decoder::new(data);
|
||||
// paramaters are correct and minimp3 is used correctly
|
||||
// parameters are correct and minimp3 is used correctly
|
||||
// thus if we crash here one of these invariants is broken:
|
||||
// .expect("should be able to allocate memory, perform IO");
|
||||
// let current_frame = decoder.decode_frame()
|
||||
let current_frame = decoder.next_frame()
|
||||
// the reader makes enough data availible therefore
|
||||
// the reader makes enough data available therefore
|
||||
// if we crash here the invariant broken is:
|
||||
.expect("data should not corrupt");
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ impl Sink {
|
|||
self.controls.pause.store(false, Ordering::SeqCst);
|
||||
}
|
||||
|
||||
// There is no `can_seek()` method as its impossible to use correctly. Between
|
||||
// There is no `can_seek()` method as it is impossible to use correctly. Between
|
||||
// checking if a source supports seeking and actually seeking the sink can
|
||||
// switch to a new source.
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ where
|
|||
blt::high_pass_with_q(self, freq, q)
|
||||
}
|
||||
|
||||
// There is no `can_seek()` method as its impossible to use correctly. Between
|
||||
// There is no `can_seek()` method as it is impossible to use correctly. Between
|
||||
// checking if a source supports seeking and actually seeking the sink can
|
||||
// switch to a new source.
|
||||
|
||||
|
|
Loading…
Reference in a new issue