Increase webaudio sample rate threshold to match firefox

This commit is contained in:
Manish Goregaokar 2018-10-10 16:29:27 -07:00
parent ceb2cd2279
commit 600f997a51
2 changed files with 2 additions and 4 deletions

View file

@ -20,10 +20,10 @@ use servo_media::audio::buffer_source_node::AudioBuffer as ServoMediaAudioBuffer
use std::cmp::min;
use std::ptr::{self, NonNull};
// This range is defined by the spec.
// Spec mandates at least [8000, 96000], we use [8000, 192000] to match Firefox
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
pub const MIN_SAMPLE_RATE: f32 = 8000.;
pub const MAX_SAMPLE_RATE: f32 = 96000.;
pub const MAX_SAMPLE_RATE: f32 = 192000.;
type JSAudioChannel = Heap<*mut JSObject>;