pub struct AudioParam { /* private fields */ }
Expand description

AudioParam controls an individual aspect of an AudioNode’s functionality, such as volume.

Implementations

Current value of the automation rate of the AudioParam

Update the current value of the automation rate of the AudioParam

Panics

Some nodes have automation rate constraints and may panic when updating the value

Retrieve the current value of the AudioParam.

Set the value of the AudioParam.

Is equivalent to calling the set_value_at_time method with the current AudioContext’s currentTime

Schedules a parameter value change at the given time.

Panics

Will panic if start_time is negative

Schedules a linear continuous change in parameter value from the previous scheduled parameter value to the given value.

Panics

Will panic if end_time is negative

Schedules an exponential continuous change in parameter value from the previous scheduled parameter value to the given value.

Panics

Will panic if:

  • value is zero
  • end_time is negative

Start exponentially approaching the target value at the given time with a rate having the given time constant.

Panics

Will panic if:

  • start_time is negative
  • time_constant is negative

Cancels all scheduled parameter changes with times greater than or equal to cancel_time.

Panics

Will panic if cancel_time is negative

Cancels all scheduled parameter changes with times greater than or equal to cancel_time and the automation value that would have happened at that time is then proprogated for all future time.

Panics

Will panic if cancel_time is negative

Sets an array of arbitrary parameter values starting at the given time for the given duration.

Panics

Will panic if:

  • value length is less than 2
  • start_time is negative
  • duration is negative or equal to zero

Trait Implementations

The number of inputs feeding into the AudioNode. For source nodes, this will be 0.

The number of outputs coming out of the AudioNode.

The BaseAudioContext concrete type which owns this AudioNode. Read more

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

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

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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.