31 {
32 DbgUI.BeginCleanupScope();
33 DbgUI.Begin("Sound debug", 10, 10);
34
35 DbgUI.PushID_Str("SoundParams");
36 DbgUI.Text("SoundParams: ");
37 DbgUI.SameLine();
38 string soundsetName = "BearGrowl_SoundSet";
39 DbgUI.InputText("", soundsetName, 200);
40 DbgUI.PopID();
41
42 DbgUI.PushID_Str("Offset");
43 DbgUI.Text("Offset pos: ");
44 vector posOffset = "0 0 0";
45 float posVal;
46
47 DbgUI.SameLine();
48 DbgUI.PushID_Int(1);
49 DbgUI.InputFloat("", posVal, 80);
50 DbgUI.PopID();
51 posOffset[0] = posVal;
52
53 DbgUI.SameLine();
54 DbgUI.PushID_Int(2);
55 DbgUI.InputFloat("", posVal, 80);
56 DbgUI.PopID();
57 posOffset[1] = posVal;
58
59 DbgUI.SameLine();
60 DbgUI.PushID_Int(3);
61 DbgUI.InputFloat("", posVal, 80);
62 DbgUI.PopID();
63 posOffset[2] = posVal;
64 DbgUI.PopID();
65
66 if(DbgUI.Button("Create"))
67 {
72 }
73
74 DbgUI.Text("SoundObjectBuilder: ");
75
76 DbgUI.Text("SoundObject: ");
77
78 DbgUI.Text("AbstractWave: ");
79
80 vector posOffset2 = "0 10 0";
81
83 {
84 DbgUI.Text("FadeInFactor: ");
85 DbgUI.SameLine();
86 DbgUI.PushID_Str("fadeIn");
88 DbgUI.PopID();
89
90 DbgUI.Text("FadeOutFactor: ");
91 DbgUI.SameLine();
92 DbgUI.PushID_Str("fadeOut");
94 DbgUI.PopID();
95
96 DbgUI.PushID_Str("Offset2");
97 DbgUI.Text("Offset2 pos: ");
98 float posVal2;
99
100 DbgUI.SameLine();
101 DbgUI.PushID_Int(100);
102 posVal2 = posOffset2[0];
103 DbgUI.InputFloat("", posVal2, 80);
104 DbgUI.PopID();
105 posOffset2[0] = posVal2;
106
107 DbgUI.SameLine();
108 DbgUI.PushID_Int(101);
109 posVal2 = posOffset2[1];
110 DbgUI.InputFloat("", posVal2, 80);
111 DbgUI.PopID();
112 posOffset2[1] = posVal2;
113
114 DbgUI.SameLine();
115 DbgUI.PushID_Int(102);
116 posVal2 = posOffset2[2];
117 DbgUI.InputFloat("", posVal2, 80);
118 DbgUI.PopID();
119 posOffset2[2] = posVal2;
120 DbgUI.PopID();
121
122 DbgUI.Text("skip: ");
123 DbgUI.SameLine();
124 float skip = 0.0;
125 DbgUI.PushID_Int(200);
126 DbgUI.InputFloat("", skip, 80);
127 DbgUI.PopID();
128
129 if(DbgUI.Button("Create and play"))
130 {
135 }
136 }
137
139 {
140 DbgUI.Text(
"Wave length: " +
m_wave.GetLength() +
"s");
141
142
143 DbgUI.Text("Volume: ");
144 DbgUI.SameLine();
145 float volume = 1.0;
146 DbgUI.InputFloat(" ", volume, 80);
147 DbgUI.SameLine();
148 if(DbgUI.Button("SetVolume"))
150 DbgUI.SameLine();
151 if(DbgUI.Button("SetVolumeRelative"))
152 m_wave.SetVolumeRelative(volume);
153
154 if(DbgUI.Button("Play"))
156 if(DbgUI.Button("Stop"))
158 if(DbgUI.Button("Restart"))
160 if(DbgUI.Button("Repeat"))
162 if(DbgUI.Button("StopRepeat"))
164 if(DbgUI.Button("Set position"))
166 }
167
168 DbgUI.End();
169 DbgUI.EndCleanupScope();
170 }
proto native AbstractSoundScene GetSoundScene()
ref SoundObject m_soundObject
ref SoundObjectBuilder m_soundBuilder
ref SoundParams m_soundParams
proto native CGame GetGame()
proto native AbstractWave Play3D(SoundObject soundObject, SoundObjectBuilder soundBuilder)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
class SoundObject SoundParams(string name)