getAudioBus method
Get a sound channel that represents the given audioBus
.
Implementation
SoundChannel getAudioBus(final AudioBus audioBus) {
final channel = _audioBusses[audioBus.id];
if (channel != null) {
return channel;
}
final reverbId = audioBus.reverbId;
final soundChannel = game.createSoundChannel(
gain: audioBus.gain ?? world.soundOptions.defaultGain,
position: audioBus.position,
reverb: reverbId == null
? null
: getReverb(world.getReverbPresetReference(reverbId)),
);
_audioBusses[audioBus.id] = soundChannel;
return soundChannel;
}