Trait script::dom::bindings::codegen::Bindings::AudioBufferBinding::AudioBuffer_Binding::AudioBufferMethods
source · 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§
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>
Object Safety§
This trait is not object safe.