Constructor
new AudioMixer(configopt)
Creates an instance of AudioMixer.
Initializes the audio context, creates and connects audio nodes, and sets config.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
config |
Object |
<optional> |
{} | Configuration for the audio mixer. |
- Source:
Classes
Members
context
Gets the context.
- Source:
node
Gets the main node.
- Source:
Methods
connect(audioItem)
Connects an audio item to the current instance if it is not already connected.
If the audio item is not in the list of items, it adds the audio item to the list
and calls the connect method on the audio item, passing the current instance.
Parameters:
| Name | Type | Description |
|---|---|---|
audioItem |
Object | The audio item to be connected. |
- Source:
destruct()
Cleans up the AudioMixer instance by stopping any ongoing processes
and disconnecting audio nodes.
- Source:
disconnect(audioItem)
Disconnects the specified audio item from the list of items and calls its disconnect method.
Parameters:
| Name | Type | Description |
|---|---|---|
audioItem |
Object | The audio item to be disconnected. |
- Source:
play()
Plays all items in the collection.
- Source:
resume()
Resumes all items in the collection by calling their resume method.
- Source:
stop()
Stops all items in the collection and then calls the parent class's stop method.
- Source: