AudioDataInit

Struct AudioDataInit 

Source
pub struct AudioDataInit { /* private fields */ }
Expand description

The AudioDataInit dictionary.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Implementations§

Source§

impl AudioDataInit

Source

pub fn get_data(&self) -> Object

Get the data field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn set_data(&self, val: &Object)

Change the data field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn get_format(&self) -> AudioSampleFormat

Get the format field of this object.

This API requires the following crate features to be activated: AudioDataInit, AudioSampleFormat

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn set_format(&self, val: AudioSampleFormat)

Change the format field of this object.

This API requires the following crate features to be activated: AudioDataInit, AudioSampleFormat

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn get_number_of_channels(&self) -> u32

Get the numberOfChannels field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn set_number_of_channels(&self, val: u32)

Change the numberOfChannels field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn get_number_of_frames(&self) -> u32

Get the numberOfFrames field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn set_number_of_frames(&self, val: u32)

Change the numberOfFrames field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn get_sample_rate(&self) -> f32

Get the sampleRate field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn set_sample_rate(&self, val: f32)

Change the sampleRate field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn get_timestamp(&self) -> f64

Get the timestamp field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn set_timestamp(&self, val: f64)

Change the timestamp field of this object.

This API requires the following crate features to be activated: AudioDataInit

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source§

impl AudioDataInit

Source

pub fn new( data: &Object, format: AudioSampleFormat, number_of_channels: u32, number_of_frames: u32, sample_rate: f32, timestamp: f64, ) -> Self

Construct a new AudioDataInit.

This API requires the following crate features to be activated: AudioDataInit, AudioSampleFormat

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Source

pub fn data(&mut self, val: &Object) -> &mut Self

👎Deprecated: Use set_data() instead.
Source

pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self

👎Deprecated: Use set_format() instead.
Source

pub fn number_of_channels(&mut self, val: u32) -> &mut Self

👎Deprecated: Use set_number_of_channels() instead.
Source

pub fn number_of_frames(&mut self, val: u32) -> &mut Self

👎Deprecated: Use set_number_of_frames() instead.
Source

pub fn sample_rate(&mut self, val: f32) -> &mut Self

👎Deprecated: Use set_sample_rate() instead.
Source

pub fn timestamp(&mut self, val: f64) -> &mut Self

👎Deprecated: Use set_timestamp() instead.

Methods from Deref<Target = Object>§

Source

pub fn constructor(&self) -> Function

The constructor property returns a reference to the Object constructor function that created the instance object.

MDN documentation

Source

pub fn has_own_property(&self, property: &JsValue) -> bool

The hasOwnProperty() method returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).

MDN documentation

Source

pub fn is_prototype_of(&self, value: &JsValue) -> bool

The isPrototypeOf() method checks if an object exists in another object’s prototype chain.

MDN documentation

Source

pub fn property_is_enumerable(&self, property: &JsValue) -> bool

The propertyIsEnumerable() method returns a Boolean indicating whether the specified property is enumerable.

MDN documentation

Source

pub fn to_locale_string(&self) -> JsString

The toLocaleString() method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.

MDN documentation

Source

pub fn