Skip to content

Commit

Permalink
Language and spelling fixes by @naglis
Browse files Browse the repository at this point in the history
Co-authored-by: naglis <[email protected]>
  • Loading branch information
dvdsk and naglis authored Oct 12, 2023
1 parent 0f7b2b2 commit ab2d6f1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/conversions/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<I, O> DataConverter<I, O> {
self.input
}

/// get mutable access to the iterator
/// Get mutable access to the iterator
#[inline]
pub fn inner_mut(&mut self) -> &mut I {
&mut self.input
Expand Down
2 changes: 1 addition & 1 deletion src/conversions/sample_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ where
self.input
}

/// get mutable access to the iterator
/// Get mutable access to the iterator
#[inline]
pub fn inner_mut(&mut self) -> &mut I {
&mut self.input
Expand Down
4 changes: 2 additions & 2 deletions src/decoder/mp3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,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");

Expand Down
2 changes: 1 addition & 1 deletion src/decoder/symphonia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl Source for SymphoniaDecoder {
.is_some_and(|dur| dur.saturating_sub(pos).as_millis() < 1);

let time = if seek_beyond_end {
let time = self.total_duration.expect("if guarentees this is Some");
let time = self.total_duration.expect("if guarantees this is Some");
skip_back_a_tiny_bit(time) // some decoders can only seek to just before the end
} else {
time_from_duration(pos)
Expand Down
8 changes: 4 additions & 4 deletions src/dynamic_mixer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,21 @@ where
// uncomment when #510 is implemented (query position of playback)

// let mut org_positions = Vec::with_capacity(self.current_sources.len());
// let mut encounterd_err = None;
// let mut encountered_err = None;
//
// for source in &mut self.current_sources {
// let pos = /* source.playback_pos() */ todo!();
// if let Err(e) = source.try_seek(pos) {
// encounterd_err = Some(e);
// encountered_err = Some(e);
// break;
// } else {
// // store pos in case we need to roll back
// org_positions.push(pos);
// }
// }
//
// if let Some(e) = encounterd_err {
// // rollback seeks that happend before err
// if let Some(e) = encountered_err {
// // rollback seeks that happened before err
// for (pos, source) in org_positions
// .into_iter()
// .zip(self.current_sources.iter_mut())
Expand Down
4 changes: 2 additions & 2 deletions src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl SeekOrder {
S::Item: Sample + Send,
{
let res = maybe_seekable.try_seek(self.pos);
let _ignore_reciever_dropped = self.feedback.send(res);
let _ignore_receiver_dropped = self.feedback.send(res);
}
}

Expand Down Expand Up @@ -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's impossible to use correctly. Between
// checking if a source supports seeking and actually seeking the sink can
// switch to a new source.

Expand Down
2 changes: 1 addition & 1 deletion src/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ where
blt::high_pass(self, freq)
}

// There is no `can_seek()` method as its impossible to use correctly. Between
// There is no `can_seek()` method as it's impossible to use correctly. Between
// checking if a source supports seeking and actually seeking the sink can
// switch to a new source.

Expand Down
2 changes: 1 addition & 1 deletion src/source/sine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl Source for SineWave {
fn try_seek(&mut self, _: Duration) -> Result<(), SeekError> {
// This is a constant sound, normal seeking would not have any effect.
// While changing the phase of the sine wave could change how it sounds in
// combination with another sound (beating) such precision is not the intend
// combination with another sound (beating) such precision is not the intent
// of seeking
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/spatial_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl SpatialSink {
/// This blocks between 0 and ~5 milliseconds.
///
/// As long as the *duration of the source is known* seeking saturates. This means
/// when you try to seek beyong the length of the source this function will seek
/// when you try to seek beyond the length of the source this function will seek
/// to the end of the source instead.
///
/// If the duration of the source is known and the seek position lies beyond
Expand Down

0 comments on commit ab2d6f1

Please sign in to comment.