ReadonlybusThe bus that owned this channel.
ReadonlyclipClips waiting to be played in next tick.
Clips could be added by Channel#pushClipToQueue.
ReadonlygainThe GainNode of the audio channel.
ReadonlynameThe name of this channel.
ReadonlytickerThe ticker of this channel, used to update Channel#clipQueue.
Get the volume of this audio channel
Set the volume of this audio channel
Disconnect audio nodes, clean clip queue, and stop ticker.
Push clip(s) to Channel#clipQueue. This/ese clip(s) will be played in next tick.
const clip = await Clip.from('https://example.com/test.mp3');
const channel = Bus.createChannel('main');
channel.startTick(); // Remember to start the ticker first!
channel.pushClipToQueue(clip); // The clip will be played in next frame.
Start ticking Channel#clipQueue. You must start ticking before add clip(s) to queue.
Stop ticking Channel#clipQueue.
An audio channel is a bridge connecting Bus and Clip.
You can't create it directly, instead you need to use Bus#createChannel:
You can adjust channel volume by setting Channel#volume: