Interface IAudioRule
You can implement an audio rule and add it to AudioRules, to modify properties of playing sounds. It gets callbacks from the engines whenever a sound has played and completed, and can add a ISoundModifier to the sound (SoundModifiers) to modify its properties.
Note: the audio rule is a conviency interface for interacting all the sounds in the system. You don't have to use it, though, there's nothing stopping you from adding sound modifiers to sounds outside this system.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IAudioRule
Properties
| Improve this Doc View SourceEnabled
Gets or sets a value indicating whether this IAudioRule is enabled.
Declaration
bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
| Improve this Doc View SourceOnSoundCompleted(ISound)
Called by the engine to notify the rule that an existing sound has completed playing.
Declaration
void OnSoundCompleted(ISound sound)
Parameters
Type | Name | Description |
---|---|---|
ISound | sound | Sound. |
OnSoundStarted(ISound)
Called by the engine to notify the rule that a new sound has started.
Declaration
void OnSoundStarted(ISound sound)
Parameters
Type | Name | Description |
---|---|---|
ISound | sound | Sound. |