Struct web_audio_api::node::OscillatorNode[][src]

pub struct OscillatorNode { /* fields omitted */ }
Expand description

Audio source generating a periodic waveform

Implementations

Returns an OscillatorNode

Arguments:
  • context - The AudioContext
  • options - The Oscillatoroptions

Returns the frequency audio parameter The oscillator frequency is calculated as follow: frequency * 2^(detune/1200)

Returns the detune audio parameter. detune unity is cents. The oscillator frequency is calculated as follow: frequency * 2^(detune/1200)

Returns the oscillator type

set the oscillator type

Arguments
  • type_ - oscillator type (sine,square,triangle,sawtooth, and custom)
Panics

Will panic if:

  • type_ is OscillatorType::Custom

set the oscillator type to custom and generate a perdioc waveform following the PeriodicWave characteristics

Trait Implementations

OscillatorNode is a source node. A source node is by definition with no input

OscillatorNode is a mono source node.

The BaseAudioContext which owns this AudioNode.

Connect the output of this AudioNode to the input of another node.

Connect a specific output of this AudioNode to a specific input of another node.

Disconnects all outputs of the AudioNode that go to a specific destination AudioNode.

Disconnects all outgoing connections from the AudioNode.

Represents an enumerated value describing the way channels must be matched between the node’s inputs and outputs. Read more

Represents an enumerated value describing the meaning of the channels. This interpretation will define how audio up-mixing and down-mixing will happen. Read more

Represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node. Read more

Schedule playback start at this timestamp

Stop playback at this timestamp

Play immediately

Stop immediately

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.