Description
The Solo
property of the Mixer
class in the Sandbox.Audio
namespace determines whether this mixer should be the only one that is heard. When set to true
, this mixer will be isolated, and all other mixers will be muted, allowing only the sounds processed by this mixer to be audible. This can be useful for debugging or focusing on a specific audio source.
Usage
To use the Solo
property, simply set it to true
or false
depending on whether you want this mixer to be the only one heard:
var mixer = new Mixer();
// Set this mixer to solo mode
mixer.Solo = true;
When Solo
is set to true
, ensure that no other mixers are set to solo unless you intend to switch focus between them.
Example
// Example of using the Solo property
Mixer myMixer = new Mixer();
// Enable solo mode for this mixer
myMixer.Solo = true;
// Check if the mixer is in solo mode
if (myMixer.Solo)
{
// Perform actions knowing this is the only audible mixer
}