Fixes seek example and various spell/grammar issues

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
This commit is contained in:
dvdsk 2024-01-31 14:53:10 +01:00
parent 4dea149dc2
commit fb44f71dc9
No known key found for this signature in database
GPG key ID: 6CF9D20C5709A836
4 changed files with 5 additions and 5 deletions

View file

@ -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));

View file

@ -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");

View file

@ -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.

View file

@ -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.