Enfusion Script API
Loading...
Searching...
No Matches
AudioSystem Interface Reference

Static Public Member Functions

static proto AudioHandle PlaySound (string path)
 Play *.wav file.
 
static proto bool PlayEventInitialize (string filename)
 Preload audio file(*.acp).
 
static proto AudioHandle PlayEvent (string filename, string eventname, vector transf[], array< string > names=null, array< float > values=null)
 
static proto bool IsSoundPlayed (AudioHandle handle)
 
static proto void TerminateSound (AudioHandle handle)
 
static proto void TerminateSoundFadeOut (AudioHandle handle, bool fade, float fadeTime)
 Terminates a sound with specific a handle, where fade-out can be applied for a specific amount of time.
 
static proto bool SetSoundTransformation (AudioHandle handle, vector transf[])
 Sets transformation for given audio handle, return FALSE if audio handle is not valid.
 
static proto float IsAudible (string filepath, string eventName, vector position)
 Returns -1.0 for the inaudible event, otherwise, it returns the distance from the passed position to the listener.
 
static proto float GetDistance (vector position)
 Returns distance to the listener.
 
static proto bool SetBoundingVolumeParams (AudioHandle handle, int volumeType, float params0, float param1, float param2)
 
static proto void Pause (int mastersMask)
 Pauses currently playing sounds and rejects insert new sounds. Use: AudioSystem.Pause((1 << AudioSystem.SFX) | (1 << AudioSystem.VoiceChat))
 
static proto void Resume (int mastersMask)
 Resumes paused sources and allow insertion of new ones.
 
static proto float OutputVolume ()
 
static proto bool SetMasterVolume (int id, float volume)
 
static proto float GetMasterVolume (int id)
 
static proto bool CreateOutputState (string filename)
 
static proto int GetOutpuStateSignalIdx (int outStateIdx, string signal)
 
static proto void SetOutputStateSignal (int outStateIdx, int idx, float value)
 
static proto int GetVariableIDByName (string varName, string filename)
 Returns ID of a variable by Name.
 
static proto string GetVariableNameByID (int ID, string filename)
 Returns Name of a variable by ID.
 
static proto float GetVariableValue (string varName, string filename)
 Returns current value of a variable by Name.
 
static proto float GetVariableByID (int ID, string filename)
 Returns current value of a variable by ID.
 
static proto bool SetVariableByName (string varName, float value, string filename)
 Returns false if variable does not exist.
 
static proto bool SetVariableByID (int ID, float value, string filename)
 Returns false if variable does not exist.
 
static proto void ResetVariables ()
 Resets all applicable values to 0 or default value.
 

Static Public Attributes

static const int SFX = 0
 
static const int Music = 1
 
static const int VoiceChat = 2
 
static const int Dialog = 3
 
static const int UI = 4
 
static const int DefaultOutputState = 0
 
static const int BV_None = 0
 
static const int BV_Sphere = 1
 
static const int BV_Box = 2
 
static const int BV_Cylinder = 3
 

Member Function Documentation

◆ CreateOutputState()

static proto bool AudioSystem.CreateOutputState ( string filename)
static

◆ GetDistance()

static proto float AudioSystem.GetDistance ( vector position)
static

Returns distance to the listener.

◆ GetMasterVolume()

static proto float AudioSystem.GetMasterVolume ( int id)
static

◆ GetOutpuStateSignalIdx()

static proto int AudioSystem.GetOutpuStateSignalIdx ( int outStateIdx,
string signal )
static

◆ GetVariableByID()

static proto float AudioSystem.GetVariableByID ( int ID,
string filename )
static

Returns current value of a variable by ID.

◆ GetVariableIDByName()

static proto int AudioSystem.GetVariableIDByName ( string varName,
string filename )
static

Returns ID of a variable by Name.

◆ GetVariableNameByID()

static proto string AudioSystem.GetVariableNameByID ( int ID,
string filename )
static

Returns Name of a variable by ID.

◆ GetVariableValue()

static proto float AudioSystem.GetVariableValue ( string varName,
string filename )
static

Returns current value of a variable by Name.

◆ IsAudible()

static proto float AudioSystem.IsAudible ( string filepath,
string eventName,
vector position )
static

Returns -1.0 for the inaudible event, otherwise, it returns the distance from the passed position to the listener.

◆ IsSoundPlayed()

static proto bool AudioSystem.IsSoundPlayed ( AudioHandle handle)
static

◆ OutputVolume()

static proto float AudioSystem.OutputVolume ( )
static

◆ Pause()

static proto void AudioSystem.Pause ( int mastersMask)
static

Pauses currently playing sounds and rejects insert new sounds. Use: AudioSystem.Pause((1 << AudioSystem.SFX) | (1 << AudioSystem.VoiceChat))

◆ PlayEvent()

static proto AudioHandle AudioSystem.PlayEvent ( string filename,
string eventname,
vector transf[],
array< string > names = null,
array< float > values = null )
static

◆ PlayEventInitialize()

static proto bool AudioSystem.PlayEventInitialize ( string filename)
static

Preload audio file(*.acp).

◆ PlaySound()

static proto AudioHandle AudioSystem.PlaySound ( string path)
static

Play *.wav file.

◆ ResetVariables()

static proto void AudioSystem.ResetVariables ( )
static

Resets all applicable values to 0 or default value.

◆ Resume()

static proto void AudioSystem.Resume ( int mastersMask)
static

Resumes paused sources and allow insertion of new ones.

◆ SetBoundingVolumeParams()

static proto bool AudioSystem.SetBoundingVolumeParams ( AudioHandle handle,
int volumeType,
float params0,
float param1,
float param2 )
static

◆ SetMasterVolume()

static proto bool AudioSystem.SetMasterVolume ( int id,
float volume )
static

◆ SetOutputStateSignal()

static proto void AudioSystem.SetOutputStateSignal ( int outStateIdx,
int idx,
float value )
static

◆ SetSoundTransformation()

static proto bool AudioSystem.SetSoundTransformation ( AudioHandle handle,
vector transf[] )
static

Sets transformation for given audio handle, return FALSE if audio handle is not valid.

◆ SetVariableByID()

static proto bool AudioSystem.SetVariableByID ( int ID,
float value,
string filename )
static

Returns false if variable does not exist.

◆ SetVariableByName()

static proto bool AudioSystem.SetVariableByName ( string varName,
float value,
string filename )
static

Returns false if variable does not exist.

◆ TerminateSound()

static proto void AudioSystem.TerminateSound ( AudioHandle handle)
static

◆ TerminateSoundFadeOut()

static proto void AudioSystem.TerminateSoundFadeOut ( AudioHandle handle,
bool fade,
float fadeTime )
static

Terminates a sound with specific a handle, where fade-out can be applied for a specific amount of time.

Member Data Documentation

◆ BV_Box

const int AudioSystem.BV_Box = 2
static

◆ BV_Cylinder

const int AudioSystem.BV_Cylinder = 3
static

◆ BV_None

const int AudioSystem.BV_None = 0
static

◆ BV_Sphere

const int AudioSystem.BV_Sphere = 1
static

◆ DefaultOutputState

const int AudioSystem.DefaultOutputState = 0
static

◆ Dialog

const int AudioSystem.Dialog = 3
static

◆ Music

const int AudioSystem.Music = 1
static

◆ SFX

const int AudioSystem.SFX = 0
static

◆ UI

const int AudioSystem.UI = 4
static

◆ VoiceChat

const int AudioSystem.VoiceChat = 2
static

The documentation for this interface was generated from the following file: