pub trait AudioBufferMethods<D: DomTypes> {
    // Required methods
    fn SampleRate(&self) -> Finite<f32>;
    fn Length(&self) -> u32;
    fn Duration(&self) -> Finite<f64>;
    fn NumberOfChannels(&self) -> u32;
    fn GetChannelData(
        &self,
        cx: SafeJSContext,
        channel: u32,
    ) -> Result<Float32Array, Error>;
    fn CopyFromChannel(
        &self,
        destination: CustomAutoRooterGuard<'_, Float32Array>,
        channelNumber: u32,
        startInChannel: u32,
    ) -> Result<(), Error>;
    fn CopyToChannel(
        &self,
        source: CustomAutoRooterGuard<'_, Float32Array>,
        channelNumber: u32,
        startInChannel: u32,
    ) -> Result<(), Error>;
    fn Constructor(
        global: &Window,
        proto: Option<HandleObject<'_>>,
        can_gc: CanGc,
        options: &AudioBufferOptions,
    ) -> Result<Root<Dom<AudioBuffer>>, Error>;
}

Required Methods§

source

fn SampleRate(&self) -> Finite<f32>

source

fn Length(&self) -> u32

source

fn Duration(&self) -> Finite<f64>

source

fn NumberOfChannels(&self) -> u32

source

fn GetChannelData( &self, cx: SafeJSContext, channel: u32, ) -> Result<Float32Array, Error>

source

fn CopyFromChannel( &self, destination: CustomAutoRooterGuard<'_, Float32Array>, channelNumber: u32, startInChannel: u32, ) -> Result<(), Error>

source

fn CopyToChannel( &self, source: CustomAutoRooterGuard<'_, Float32Array>, channelNumber: u32, startInChannel: u32, ) -> Result<(), Error>

source

fn Constructor( global: &Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, options: &AudioBufferOptions, ) -> Result<Root<Dom<AudioBuffer>>, Error>

Object Safety§

This trait is not object safe.

Implementors§