logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AudioEffect

    Plays a sound (an authored audio-player clip) as part of a feedback definition, so a single PlayFeedbackSignal can fire a coordinated rumble + flash + sound cue. Unlike the haptic effects, audio is independent of the vibration settings: it plays even when controller vibration is disabled and its volume is never attenuated by the haptic-intensity slider. Carries only the clip's identity (id/path) plus the routing type and volume — the channel rebuilds an AudioPlayerClip and plays it through the audio system.

    Inheritance
    object
    AudioEffect
    Implements
    IFeedbackEffect
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Feedback.Application.Effects
    Assembly: Serenity.Feedback.Application.dll
    Syntax
    public sealed class AudioEffect : IFeedbackEffect

    Constructors

    AudioEffect(string, string, AudioPlayerType, float)

    Initializes a new instance from a clip's identity, routing type and volume.

    Declaration
    public AudioEffect(string audioClipId, string audioClipPath, AudioPlayerType clipType = 0, float volume = 1)
    Parameters
    Type Name Description
    string audioClipId

    Identifier of the source clip definition.

    string audioClipPath

    Asset path of the clip.

    AudioPlayerType clipType

    Audio player type the sound routes through (default SFX).

    float volume

    Playback volume in 0..1 (default 1).

    Fields

    AudioClipId

    Declaration
    public readonly string AudioClipId
    Field Value
    Type Description
    string

    Identifier of the source audio-player clip definition.

    AudioClipPath

    Declaration
    public readonly string AudioClipPath
    Field Value
    Type Description
    string

    Asset path of the clip, used to build the playable AudioPlayerClip.

    ClipType

    Declaration
    public readonly AudioPlayerType ClipType
    Field Value
    Type Description
    AudioPlayerType

    Which audio player (channel/mixer routing) the sound plays through, e.g. SFX or UI.

    Kind

    Declaration
    public const string Kind = "audio"
    Field Value
    Type Description
    string

    Stable kind id for this effect.

    Volume

    Declaration
    public readonly float Volume
    Field Value
    Type Description
    float

    Playback volume (0..1). Authored on the effect; not scaled by the haptic-intensity setting.

    Properties

    BypassesGlobalGate

    Declaration
    public bool BypassesGlobalGate { get; }
    Property Value
    Type Description
    bool

    When true, this effect ignores the global vibration enable/intensity settings — it is dispatched even when feedback is disabled and is never passed through Scaled(float). Reserved for non-haptic effects (e.g. audio) that must not be silenced or attenuated by the controller-vibration toggle. Haptic effects return false.

    EffectKind

    Declaration
    public string EffectKind { get; }
    Property Value
    Type Description
    string

    Stable identifier of the effect type (e.g. "vibration"). Used for logging/diagnostics.

    Methods

    Scaled(float)

    Audio bypasses the global gate, so the service never scales it; returns this unchanged.

    Declaration
    public IFeedbackEffect Scaled(float globalIntensity)
    Parameters
    Type Name Description
    float globalIntensity
    Returns
    Type Description
    IFeedbackEffect

    Implements

    IFeedbackEffect
    In this article
    © 2026 Serenity. All Rights Reserved