pub(crate) 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,
_can_gc: CanGc,
) -> Fallible<Float32Array>;
fn CopyFromChannel(
&self,
destination: CustomAutoRooterGuard<'_, Float32Array>,
channelNumber: u32,
startInChannel: u32,
) -> Fallible<()>;
fn CopyToChannel(
&self,
source: CustomAutoRooterGuard<'_, Float32Array>,
channelNumber: u32,
startInChannel: u32,
_can_gc: CanGc,
) -> Fallible<()>;
fn Constructor(
global: &D::Window,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
options: &AudioBufferOptions,
) -> Fallible<DomRoot<D::AudioBuffer>>;
}
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, _can_gc: CanGc, ) -> Fallible<Float32Array>
fn CopyFromChannel( &self, destination: CustomAutoRooterGuard<'_, Float32Array>, channelNumber: u32, startInChannel: u32, ) -> Fallible<()>
fn CopyToChannel( &self, source: CustomAutoRooterGuard<'_, Float32Array>, channelNumber: u32, startInChannel: u32, _can_gc: CanGc, ) -> Fallible<()>
fn Constructor( global: &D::Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, options: &AudioBufferOptions, ) -> Fallible<DomRoot<D::AudioBuffer>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.