pub trait BaseAudioContextMethods {
Show 21 methods
// Required methods
fn Destination(&self) -> Root<Dom<AudioDestinationNode>>;
fn SampleRate(&self) -> Finite<f32>;
fn CurrentTime(&self) -> Finite<f64>;
fn Listener(&self) -> Root<Dom<AudioListener>>;
fn State(&self) -> AudioContextState;
fn Resume(&self, _comp: InRealm<'_>, _can_gc: CanGc) -> Rc<Promise>;
fn GetOnstatechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnstatechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn CreateBuffer(
&self,
numberOfChannels: u32,
length: u32,
sampleRate: Finite<f32>,
_can_gc: CanGc,
) -> Result<Root<Dom<AudioBuffer>>, Error>;
fn DecodeAudioData(
&self,
audioData: CustomAutoRooterGuard<'_, ArrayBuffer>,
successCallback: Option<Rc<DecodeSuccessCallback>>,
errorCallback: Option<Rc<DecodeErrorCallback>>,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn CreateBufferSource(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<AudioBufferSourceNode>>, Error>;
fn CreateConstantSource(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<ConstantSourceNode>>, Error>;
fn CreateAnalyser(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<AnalyserNode>>, Error>;
fn CreateGain(&self, _can_gc: CanGc) -> Result<Root<Dom<GainNode>>, Error>;
fn CreateBiquadFilter(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<BiquadFilterNode>>, Error>;
fn CreateIIRFilter(
&self,
feedforward: Vec<Finite<f64>>,
feedback: Vec<Finite<f64>>,
_can_gc: CanGc,
) -> Result<Root<Dom<IIRFilterNode>>, Error>;
fn CreatePanner(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<PannerNode>>, Error>;
fn CreateStereoPanner(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<StereoPannerNode>>, Error>;
fn CreateChannelSplitter(
&self,
numberOfOutputs: u32,
_can_gc: CanGc,
) -> Result<Root<Dom<ChannelSplitterNode>>, Error>;
fn CreateChannelMerger(
&self,
numberOfInputs: u32,
_can_gc: CanGc,
) -> Result<Root<Dom<ChannelMergerNode>>, Error>;
fn CreateOscillator(
&self,
_can_gc: CanGc,
) -> Result<Root<Dom<OscillatorNode>>, Error>;
}