![]() |
Dayz Explorer 1.28.160049
|
Wrapper class for managing sound through SEffectManager. More...
Protected Member Functions | |
EffectType | |
Information about what type of effect the Effect is, without the need for casting | |
| override EffectType | GetEffectType () |
| Get what type of effect the Effect is. | |
| override bool | IsSound () |
| Check whether the Effect is EffectSound without casting. | |
Playback | |
Methods to Play/Stop sound Generally, SEffectManager.PlaySound methods are used instead of SoundPlay | |
| bool | SoundPlayEx (out SoundParams params) |
| Plays sound. | |
| bool | SoundPlay () |
| Plays sound. | |
| override void | Start () |
| Plays sound. | |
| void | SoundStop () |
| Stops sound. | |
| override void | Stop () |
| Stops sound. | |
| void | SoundReset () |
| Resets EffectSound. | |
| bool | IsSoundPlaying () |
| Get whether EffectSound is currently playing. | |
| override bool | IsPlaying () |
| Returns true when the effect is playing, false otherwise. | |
Sound load | |
Methods regarding the loading of the sound, used in SoundPlay | |
| bool | SoundLoadEx (out SoundParams params) |
| Loads in the sound when it is requested for playing through 'SoundPlayEx'. | |
| bool | SoundLoad () |
| Loads in the sound when it is requested for playing. | |
| bool | IsSoundValid () |
| Helper for checking if params are valid. | |
| void | ValidateSoundWave () |
| Gets called to fill in the necessary data when the header has finished loading. | |
| bool | SoundWaveValidation () |
| Validation of fade settings. | |
| void | UpdateEvents () |
| Enables the frame event on the EffectSound. | |
Events | |
Various events that can be overriden for custom behaviour | |
| override void | Event_OnFrameUpdate (float time_delta) |
| Event called on frame when enabled by SetEnableEventFrame(true) | |
| override void | Event_OnRegistered (int id) |
| Event called from SEffectManager when the Effect is registered. | |
| override void | Event_OnUnregistered () |
| Event called from SEffectManager when the Effect is unregistered. | |
| void | Event_OnSoundWaveStarted () |
| Event called when sound starts playing. | |
| void | Event_OnSoundWaveEnded () |
| Event called when sound stops playing. | |
| void | Event_OnSoundFadeInStopped () |
| Event called when sound fade in stops. | |
| void | Event_OnSoundFadeOutStarted () |
| Event called when sound fade out starts. | |
AutoDestroy | |
Methods regarding automatic cleanup on stop | |
| override void | SetAutodestroy (bool auto_destroy) |
| Sets whether Effect automatically cleans up when it stops. | |
| override bool | IsAutodestroy () |
| Get whether Effect automatically cleans up when it stops. | |
| void | SetSoundAutodestroy (bool auto_destroy) |
| Sets whether EffectSound automatically cleans up when sound stops. | |
| bool | IsSoundAutodestroy () |
| Get whether EffectSound automatically cleans up when sound stops. | |
| override bool | CanDestroy () |
Generic API | |
Setters and getters for generic data and properties | |
| override void | SetParent (Object parent_obj, int pivot) |
| Set parent for the sound to follow. | |
| override Object | GetParent () |
| Get parent for the EffectSound. | |
| override int | GetPivotIndex () |
| Get parent pivot of the Effect, only valid when there is some GetParent. | |
| override Object | GetCurrentParent () |
| Get parent for the EffectSound. | |
| override void | SetCurrentPosition (vector pos, bool updateCached=true) |
| Set the world position of the managed sound. | |
| override vector | GetCurrentPosition () |
| Get the current world position of the managed sound. | |
| override void | SetCurrentLocalPosition (vector pos, bool updateCached=true) |
| Set the current local position of the managed sound. | |
| override vector | GetCurrentLocalPosition () |
| Get the current local position of the managed sound. | |
| void | SetSoundWaveKind (WaveKind wave_kind) |
| Set WaveKind for the sound. | |
| void | SetSoundSet (string snd) |
| Set soundset for the sound. | |
| string | GetSoundSet () |
| Get soundset for the sound. | |
| void | SetSoundLoop (bool loop) |
| Set if the sound loops. | |
| void | SetEnviromentVariables (bool setEnvVariables) |
| Sets whether AddEnvSoundVariables needs to be called during Loading. | |
| float | GetSoundWaveLenght () |
| Get the sound wave length. | |
| float | GetSoundWaveLength () |
| Get the sound wave length. | |
| void | SetSoundVolume (float volume) |
| Set the RELATIVE volume for the sound. | |
| float | GetSoundVolume () |
| Get the RELATIVE volume set by 'SetSoundVolume'. | |
| void | SetSoundMaxVolume (float volume) |
| Set the sound max volume. | |
| float | GetSoundWaveTime () |
| Get the time since EffectSound started playing. | |
| void | SetSoundFadeIn (float fade_in) |
| Set the sound fade in duration. | |
| void | SetSoundFadeOut (float fade_out) |
| Set the sound fade out duration. | |
| void | SetDoppler (bool setDoppler) |
| Set if the sound has the doppler effect enabled. | |
| void | SoundError (string err_msg) |
| Helper for throwing sound errors. | |
Protected Attributes | |
Sound objects and structures | |
Objects and structures for the sound | |
| ref SoundParams | m_SoundParams |
| ref SoundObjectBuilder | m_SoundObjectBuilder |
| ref SoundObject | m_SoundObject |
| AbstractWave | m_SoundWaveObject |
Generic data | |
Generic data for the sound | |
| WaveKind | m_SoundWaveKind |
| string | m_SoundSetName |
| bool | m_SoundLoop |
| bool | m_SetEnvVariables |
| bool | m_SoundAutodestroy |
| bool | m_SoundWaveIsPlaying |
| float | m_SoundWaveLenght |
| float | m_SoundWaveVolume |
| float | m_SoundWaveVolumeMax |
| float | m_SoundWaveTime |
| int | m_SoundDoppler |
Fading data | |
Data for fadein/fadeout for the sound | |
| bool | m_SoundWaveStarting |
| bool | m_SoundWaveStopping |
| bool | m_SoundFadedOut |
| float | m_SoundFadeInDuration |
| float | m_SoundFadeOutStartTime |
| float | m_SoundFadeOutDuration |
| float | m_SoundFadeOutInitVolume |
| void | EffectSound () |
| ctor | |
| void | ~EffectSound () |
| dtor | |
| override void | InitEffect () |
| init | |
| override string | GetDebugName () |
| Override when getting debug information. | |
Wrapper class for managing sound through SEffectManager.
Definition at line 4 of file effectsound.c.
|
protected |
ctor
Definition at line 63 of file effectsound.c.
|
protected |
dtor
Definition at line 77 of file effectsound.c.
|
protected |
Definition at line 636 of file effectsound.c.
|
protected |
Event called on frame when enabled by SetEnableEventFrame(true)
| time_delta | float Time passed since the previous frame |
Definition at line 460 of file effectsound.c.
|
protected |
Event called from SEffectManager when the Effect is registered.
| id | int ID registered in SEffectManager |
Definition at line 527 of file effectsound.c.
|
protected |
Event called when sound fade in stops.
Definition at line 575 of file effectsound.c.
|
protected |
Event called when sound fade out starts.
Definition at line 584 of file effectsound.c.
|
protected |
Event called when sound stops playing.
Definition at line 562 of file effectsound.c.
|
protected |
Event called when sound starts playing.
Definition at line 549 of file effectsound.c.
|
protected |
Event called from SEffectManager when the Effect is unregistered.
Definition at line 538 of file effectsound.c.
|
protected |
Get the current local position of the managed sound.
vector The current local position of the managed sound Definition at line 756 of file effectsound.c.
|
protected |
Get parent for the EffectSound.
Object The parent for the EffectSound Definition at line 694 of file effectsound.c.
|
protected |
Get the current world position of the managed sound.
vector The current world position of the managed sound Definition at line 726 of file effectsound.c.
|
protected |
Override when getting debug information.
Definition at line 97 of file effectsound.c.
|
protected |
Get what type of effect the Effect is.
EffectType What type of effect the Effect is Definition at line 123 of file effectsound.c.
|
protected |
Get parent for the EffectSound.
Object The parent for the EffectSound Definition at line 668 of file effectsound.c.
|
protected |
Get parent pivot of the Effect, only valid when there is some GetParent.
int The parent pivot of the Effect Definition at line 681 of file effectsound.c.
|
protected |
Get soundset for the sound.
string Name of the soundset Definition at line 803 of file effectsound.c.
|
protected |
Get the RELATIVE volume set by 'SetSoundVolume'.
float The relative volume for the sound set by 'SetSoundVolume' Definition at line 863 of file effectsound.c.
|
protected |
Get the sound wave length.
float The sound wave length Definition at line 834 of file effectsound.c.
|
protected |
Get the sound wave length.
float The sound wave length Definition at line 843 of file effectsound.c.
|
protected |
Get the time since EffectSound started playing.
float The time since EffectSound started playing Definition at line 886 of file effectsound.c.
|
protected |
init
Definition at line 85 of file effectsound.c.
|
protected |
Get whether Effect automatically cleans up when it stops.
bool Whether Effect automatically cleans up when it stops Definition at line 613 of file effectsound.c.
|
protected |
Returns true when the effect is playing, false otherwise.
Definition at line 282 of file effectsound.c.
|
protected |
Check whether the Effect is EffectSound without casting.
bool Whether the Effect is EffectSound Definition at line 132 of file effectsound.c.
|
protected |
Get whether EffectSound automatically cleans up when sound stops.
bool Whether EffectSound automatically cleans up when sound stops Definition at line 631 of file effectsound.c.
|
protected |
Get whether EffectSound is currently playing.
bool Whether EffectSound is currently playing Definition at line 274 of file effectsound.c.
|
protected |
Helper for checking if params are valid.
Definition at line 356 of file effectsound.c.
|
protected |
Sets whether Effect automatically cleans up when it stops.
| auto_destroy | bool Whether Effect automatically cleans up when it stops |
Definition at line 603 of file effectsound.c.
|
protected |
Set the current local position of the managed sound.
| pos | vector The current local position for the managed sound |
| updateCached | bool Whether to update the cached variable |
Definition at line 742 of file effectsound.c.
Set the world position of the managed sound.
| pos | vector The world position of the managed sound |
| updateCached | bool Whether to update the cached variable |
Definition at line 707 of file effectsound.c.
|
protected |
Set if the sound has the doppler effect enabled.
| setDoppler | float If the doppler effect is enabled |
bool is a fancy int, ensure the bool is 0 or 1 and don't allow -1 here since resetting isn't supported
Definition at line 913 of file effectsound.c.
|
protected |
Sets whether AddEnvSoundVariables needs to be called during Loading.
| setEnvVariables | bool Whether AddEnvSoundVariables is called |
Definition at line 824 of file effectsound.c.
Set parent for the sound to follow.
| parent_obj | Object The parent for the sound to follow |
Definition at line 654 of file effectsound.c.
|
protected |
Sets whether EffectSound automatically cleans up when sound stops.
| auto_destroy | bool Whether EffectSound automatically cleans up when sound stops |
Definition at line 622 of file effectsound.c.
|
protected |
Set the sound fade in duration.
| fade_in | float The fade in duration |
Definition at line 895 of file effectsound.c.
|
protected |
Set the sound fade out duration.
| fade_out | float The fade out duration |
Definition at line 904 of file effectsound.c.
|
protected |
Set if the sound loops.
| loop | bool Whether the sound should loop |
Definition at line 812 of file effectsound.c.
|
protected |
Set the sound max volume.
| volume | float The maximum volume for the sound |
Definition at line 874 of file effectsound.c.
|
protected |
Set soundset for the sound.
| snd | string Name of the soundset to play |
Definition at line 794 of file effectsound.c.
|
protected |
Set the RELATIVE volume for the sound.
| volume | float The relative volume for the sound |
Definition at line 852 of file effectsound.c.
|
protected |
Set WaveKind for the sound.
| wave_kind | WaveKind The WaveKind for the sound |
Definition at line 784 of file effectsound.c.
|
protected |
Helper for throwing sound errors.
Definition at line 930 of file effectsound.c.
|
protected |
Loads in the sound when it is requested for playing.
Definition at line 347 of file effectsound.c.
|
protected |
Loads in the sound when it is requested for playing through 'SoundPlayEx'.
| params | SoundParams Possibility of passing in an already existing SoundParams, else one will get created |
Definition at line 300 of file effectsound.c.
|
protected |
Plays sound.
bool Whether the sound will start playing Definition at line 199 of file effectsound.c.
|
protected |
Plays sound.
| params | SoundParams Sound Parameters for the sound |
bool Whether the sound will start playing Definition at line 152 of file effectsound.c.
|
protected |
Resets EffectSound.
Definition at line 252 of file effectsound.c.
|
protected |
Stops sound.
Definition at line 217 of file effectsound.c.
|
protected |
Validation of fade settings.
Definition at line 403 of file effectsound.c.
|
protected |
Plays sound.
Definition at line 208 of file effectsound.c.
|
protected |
Stops sound.
Definition at line 244 of file effectsound.c.
|
protected |
Enables the frame event on the EffectSound.
Definition at line 433 of file effectsound.c.
|
protected |
Gets called to fill in the necessary data when the header has finished loading.
Definition at line 365 of file effectsound.c.
|
protected |
Definition at line 33 of file effectsound.c.
|
protected |
Definition at line 34 of file effectsound.c.
|
protected |
Definition at line 40 of file effectsound.c.
|
protected |
Definition at line 49 of file effectsound.c.
|
protected |
Definition at line 51 of file effectsound.c.
|
protected |
Definition at line 54 of file effectsound.c.
|
protected |
Definition at line 55 of file effectsound.c.
|
protected |
Definition at line 53 of file effectsound.c.
|
protected |
Definition at line 32 of file effectsound.c.
|
protected |
Definition at line 22 of file effectsound.c.
|
protected |
Definition at line 21 of file effectsound.c.
|
protected |
Definition at line 20 of file effectsound.c.
|
protected |
Definition at line 31 of file effectsound.c.
|
protected |
Definition at line 35 of file effectsound.c.
|
protected |
Definition at line 30 of file effectsound.c.
|
protected |
Definition at line 36 of file effectsound.c.
|
protected |
Definition at line 23 of file effectsound.c.
|
protected |
Definition at line 47 of file effectsound.c.
|
protected |
Definition at line 48 of file effectsound.c.
|
protected |
Definition at line 39 of file effectsound.c.
|
protected |
Definition at line 37 of file effectsound.c.
|
protected |
Definition at line 38 of file effectsound.c.