MixerHandle TargetMixer { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The TargetMixer property of the BaseSoundComponent class specifies the audio mixer through which the sound should be played. This allows for routing the audio output of the sound component to a specific mixer, enabling more advanced audio processing and control.

Usage

To use the TargetMixer property, assign it a valid Audio.MixerHandle that represents the desired audio mixer. This can be done in the initialization phase of your component or dynamically during runtime if you need to change the audio routing.

Example

// Example of setting the TargetMixer property
public class MySoundComponent : BaseSoundComponent
{
    public MySoundComponent()
    {
        // Assuming you have a valid MixerHandle instance
        Audio.MixerHandle myMixer = Audio.GetMixer("MyCustomMixer");
        this.TargetMixer = myMixer;
    }
}