Fix some typo and warnings

This commit is contained in:
Rémi Lauzier 2021-06-28 11:55:15 -04:00
parent 5bbfa4992e
commit ba462dad18
No known key found for this signature in database
GPG key ID: D4B9ECD143336C1D
28 changed files with 98 additions and 98 deletions

View file

@ -47,7 +47,7 @@ const MIN_SAMPLE_RATE: SampleRate = SampleRate(8_000);
const MAX_SAMPLE_RATE: SampleRate = SampleRate(96_000);
const DEFAULT_SAMPLE_RATE: SampleRate = SampleRate(44_100);
const MIN_BUFFER_SIZE: u32 = 1;
const MAX_BUFFER_SIZE: u32 = std::u32::MAX;
const MAX_BUFFER_SIZE: u32 = u32::MAX;
const DEFAULT_BUFFER_SIZE: usize = 2048;
const SUPPORTED_SAMPLE_FORMAT: SampleFormat = SampleFormat::F32;
@ -249,7 +249,7 @@ impl StreamTrait for Stream {
}
}
// The first argument of the callback function (a `void*`) is a casted pointer to `self`
// The first argument of the callback function (a `void*`) is a cast pointer to `self`
// and to the `callback` parameter that was passed to `run`.
fn audio_callback_fn<D, E>(
user_data_ptr: *mut c_void,
@ -282,7 +282,7 @@ fn audio_callback_fn<D, E>(
.try_into()
.expect("failed to retrieve Value as f64");
let callback = crate::StreamInstant::from_secs_f64(now_secs);
// TODO: Use proper latency instead. Currently unsupported on most browsers though so
// TODO: Use proper latency instead. Currently, unsupported on most browsers though, so
// we estimate based on buffer size instead. Probably should use this, but it's only
// supported by firefox (2020-04-28).
// let latency_secs: f64 = js!(@{audio_ctxt}.outputLatency).try_into().unwrap();