DayZ 1.24
Loading...
Searching...
No Matches
Sound.c
Go to the documentation of this file.
19 private void ~AbstractSoundScene() {}
26 proto native void SetRadioVolume(float vol, float time);
30
32 proto native void SetMusicVolume(float vol, float time);
33
35 proto native void SetSoundVolume(float vol, float time);
36
38 proto native void SetVOIPVolume(float vol, float time);
39
42}
43
44
72
73
74class SoundObject
75{
77
79
82 proto native void SetParent(IEntity parent, int pivot = -1);
85
89
93
97}
98
99//soundsys.hpp
101{
102 void SoundParams(string name);
103
104 proto native bool Load(string name);
106 proto string GetName();
107}
108
110{
116}
117
119{
120 private void InitEvents()
121 {
124 }
125
126#ifdef DIAG_DEVELOPER
127 private void AbstractWave() { InitEvents(); }
128 private void ~AbstractWave() {}
129#else
131#endif
132
135
136 proto void Play();
137
139 {
140 Play();
142 }
143 //proto native void Mute();
144 proto void Stop();
151 proto void Loop(bool setLoop);
153 proto void SetVolume(float value);
161 proto void Skip(float timeSec);
163
168
169 void OnPlay()
170 {
171 GetEvents().Event_OnSoundWaveStarted.Invoke(this);
172 }
173
174 void OnStop()
175 {
176 GetEvents().Event_OnSoundWaveStopped.Invoke(this);
177 }
178
179 void OnLoad()
180 {
181 GetEvents().Event_OnSoundWaveLoaded.Invoke(this);
182 }
183
185 {
186 GetEvents().Event_OnSoundWaveHeaderLoaded.Invoke(this);
187 }
188
189 void OnEnd()
190 {
191 GetEvents().Event_OnSoundWaveEnded.Invoke(this);
192 }
193}
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
void SetParent(Object parent_obj)
Set parent of the Effect.
Definition Effect.c:378
proto native void SetSpeed(vector speed)
Note: Sets the speed locally if parented, retrieves globally with the parent speed.
WAVEENVIRONMENTEX
Definition Sound.c:25
WAVEENVIRONMENT
Definition Sound.c:24
proto native AbstractWave Play2D(SoundObject soundObject, SoundObjectBuilder soundBuilder)
ref ScriptInvoker Event_OnSoundWaveEnded
Definition Sound.c:115
WaveKind
Definition Sound.c:2
proto native void Initialize(SoundParams soundParams)
WAVEWEAPONSEX
Definition Sound.c:27
ref ScriptInvoker Event_OnSoundWaveLoaded
Definition Sound.c:113
proto native float GetAudioLevel()
ref ScriptInvoker Event_OnSoundWaveStopped
Definition Sound.c:112
proto native void SetKind(WaveKind kind)
enum WaveKind AbstractSoundScene()
Definition Sound.c:18
proto native float GetSilenceThreshold()
WAVEWEAPONS
Definition Sound.c:26
WAVEEFFECT
Definition Sound.c:19
SoundObject BuildSoundObject()
Definition Sound.c:2
proto native void SetSoundVolume(float vol, float time)
proto native float GetSpeechExVolume()
proto native float GetMusicVolume()
proto native float GetSoundVolume()
proto native float GetVOIPVolume()
proto native void SetSpeechExVolume(float vol, float time)
class SoundObjectBuilder SoundObject(SoundParams soundParams)
proto native vector GetSpeed()
ref ScriptInvoker Event_OnSoundWaveHeaderLoaded
Definition Sound.c:114
WAVEUI
Definition Sound.c:30
proto void UpdateVariables(notnull array< float > values)
WAVEEFFECTEX
Definition Sound.c:20
proto native AbstractWave Play3D(SoundObject soundObject, SoundObjectBuilder soundBuilder)
proto native int GetHierarchyPivot()
WAVEATTALWAYS
Definition Sound.c:28
WAVESPEECHEX
Definition Sound.c:23
void ~AbstractSoundScene()
Definition Sound.c:19
proto native void SetMusicVolume(float vol, float time)
proto native void SetVOIPVolume(float vol, float time)
proto native void SetRadioVolume(float vol, float time)
proto native void SetOcclusionObstruction(float occlusion, float obstruction)
WAVESPEECH
Definition Sound.c:21
WAVEMUSIC
Definition Sound.c:22
proto native float GetRadioVolume()
class SoundParams Event_OnSoundWaveStarted
class JsonUndergroundAreaTriggerData GetPosition
proto float GetVolume()
proto bool IsHeaderLoaded()
proto Managed GetUserData()
proto void Play()
proto void SetPosition(vector position, vector velocity="0 0 0")
proto void SetFrequency(float value)
proto void SetUserData(Managed inst)
void OnLoad()
Definition Sound.c:179
proto void SetVolume(float value)
void PlayWithOffset(float offset)
Definition Sound.c:138
void OnEnd()
Definition Sound.c:189
proto float GetLength()
WARNING: Blocking! Waits for header to load.
proto void Loop(bool setLoop)
AbstractWaveEvents GetEvents()
Definition Sound.c:164
proto void Skip(float timeSec)
void InitEvents()
Definition Sound.c:120
proto void Stop()
void OnPlay()
Definition Sound.c:169
proto float GetCurrPosition()
Current position in percentage of total length.
proto void SetStartOffset(float offset)
void OnHeaderLoad()
Definition Sound.c:184
proto float GetFrequency()
proto void SetFadeOutFactor(float volume)
void AbstractWave()
Definition Sound.c:130
proto void SetVolumeRelative(float value)
proto void SetFadeInFactor(float volume)
proto void Restart()
void OnStop()
Definition Sound.c:174
proto void SetDoppler(bool setDoppler)
TODO doc.
Definition EnScript.c:118
ScriptInvoker Class provide list of callbacks usage:
Definition tools.c:116
void UpdateEnvSoundControllers(vector position)
Deprecated - same functionality, just poor naming.
Definition Sound.c:61
proto native void Initialize(SoundParams soundParams)
proto native void AddEnvSoundVariables(vector position)
void SoundObjectBuilder(SoundParams soundParams)
proto native void AddVariable(string name, float value)
proto void AddVariables(notnull array< string > names, array< float > values=null)
SoundObject BuildSoundObject()
Definition Sound.c:49
void SetVariable(string name, float value)
Deprecated - same functionality, just poor naming.
Definition Sound.c:67
void SoundParams(string name)
proto native bool IsValid()
proto native bool Load(string name)
proto string GetName()
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition Effect.c:420
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:389