Instance of SoundOnDemand.Channel - imagine it as a tube that sound has to get through. This tube makes the sound audible and modifies its properies such as volume or reverberation.
Channels can be created by an instance of SoundOnDemand
this.audio = new SoundOnDemand(); /* you can create as many channels as you need */ this.gui = this.audio.channel("gui"); this.game = this.audio.channel("game"); this.music = this.audio.channel("music");
Adjust volume of a channel.
Mix any sound that gets through a tube with an impulse response. It's mostly used to create a reverb effect
And when you've already picked some impulse you can change just amount:
Impulse response is just an audio file. In this case reverbs/cave.ogg
You can get a lot of free impulse responses in OpenAir project
A brief explanation of impulse responses and convolution
Clap your hands. Sound will propagate, get bounced of the walls and come back to your ear. If you were standing in a cave you would hear significant echo and reverb as some of this sound gets back to your ear earlier while the rest have to hit distant walls.
If you could record that clap - you would get what we call an impulse response - a three dimensional image of sound propagation in an environment. Imagine it as a raycasting for sound.
Then you could mix this response with another sound to reproduce the original environment of the impulse through a process called convolution wgucg we use it to simulate variety range of reverbs and environements including caves, forest or a guy talking through a telephone.