Fix some typo and warnings
This commit is contained in:
parent
5bbfa4992e
commit
ba462dad18
28 changed files with 98 additions and 98 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue