File tree Expand file tree Collapse file tree 7 files changed +66
-3
lines changed
Generals/Code/Libraries/Source/WWVegas Expand file tree Collapse file tree 7 files changed +66
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ target_include_directories(g_wwcommon INTERFACE
17
17
Wwutil
18
18
)
19
19
20
+ add_subdirectory (WWAudio )
20
21
add_subdirectory (WWMath )
21
22
add_subdirectory (Wwutil )
22
23
add_subdirectory (WW3D2 )
@@ -28,6 +29,7 @@ add_library(g_wwvegas INTERFACE)
28
29
target_include_directories (g_wwvegas INTERFACE
29
30
.
30
31
WW3D2
32
+ WWAudio
31
33
WWDownload
32
34
Wwutil
33
35
)
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ class AudioCallbackListClass : public SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T
151
151
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::Vector;
152
152
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::ActiveCount;
153
153
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::Delete;
154
+ using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::Add;
154
155
155
156
public:
156
157
Original file line number Diff line number Diff line change
1
+ set (WWAUDIO_SRC
2
+ "AABTreeSoundCullClass.h"
3
+ "AudibleSound.cpp"
4
+ "AudibleSound.h"
5
+ "AudioEvents.h"
6
+ "AudioSaveLoad.cpp"
7
+ "AudioSaveLoad.h"
8
+ "FilteredSound.cpp"
9
+ "FilteredSound.h"
10
+ "Listener.cpp"
11
+ "Listener.h"
12
+ "listenerhandle.cpp"
13
+ "listenerhandle.h"
14
+ "LogicalListener.cpp"
15
+ "LogicalListener.h"
16
+ "LogicalSound.cpp"
17
+ "LogicalSound.h"
18
+ "PriorityVector.h"
19
+ "sound2dhandle.cpp"
20
+ "sound2dhandle.h"
21
+ "Sound3D.cpp"
22
+ "Sound3D.h"
23
+ "sound3dhandle.cpp"
24
+ "sound3dhandle.h"
25
+ "SoundBuffer.cpp"
26
+ "SoundBuffer.h"
27
+ "SoundChunkIDs.h"
28
+ "SoundCullObj.h"
29
+ "soundhandle.cpp"
30
+ "soundhandle.h"
31
+ "SoundPseudo3D.cpp"
32
+ "SoundPseudo3D.h"
33
+ "SoundScene.cpp"
34
+ "SoundScene.h"
35
+ "SoundSceneObj.cpp"
36
+ "SoundSceneObj.h"
37
+ "soundstreamhandle.cpp"
38
+ "soundstreamhandle.h"
39
+ "Threads.cpp"
40
+ "Threads.h"
41
+ "Utils.cpp"
42
+ "Utils.h"
43
+ "WWAudio.cpp"
44
+ "WWAudio.h"
45
+ )
46
+
47
+ add_library (g_wwaudio STATIC )
48
+ set_target_properties (g_wwaudio PROPERTIES OUTPUT_NAME wwaudio )
49
+
50
+ target_sources (g_wwaudio PRIVATE ${WWAUDIO_SRC} )
51
+
52
+ target_link_libraries (g_wwaudio PRIVATE
53
+ g_wwcommon
54
+ )
Original file line number Diff line number Diff line change 47
47
template <class T >
48
48
class PriorityVectorClass : public DynamicVectorClass <T>
49
49
{
50
+ using DynamicVectorClass<T>::Vector;
51
+ using DynamicVectorClass<T>::ActiveCount;
52
+
50
53
public:
51
54
52
55
virtual bool Process_Head (T &object);
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ SoundSceneClass::Collect_Audible_Sounds
278
278
float length2 = (pos - listener_pos).Length2 ();
279
279
if (length2 <= radius2) {
280
280
281
- AudibleInfoClass *audible_info = W3DNEW AudibleInfoClass (sound_obj, length2);
281
+ AudibleInfoClass *audible_info = new AudibleInfoClass (sound_obj, length2);
282
282
list.Add (audible_info);
283
283
284
284
//
@@ -310,7 +310,7 @@ SoundSceneClass::Collect_Audible_Sounds
310
310
float length2 = (pos - listener_pos).Length2 ();
311
311
if (length2 <= radius2) {
312
312
313
- AudibleInfoClass *audible_info = W3DNEW AudibleInfoClass (sound_obj, length2);
313
+ AudibleInfoClass *audible_info = new AudibleInfoClass (sound_obj, length2);
314
314
list.Add (audible_info);
315
315
316
316
//
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ class SoundSceneClass
178
178
// ////////////////////////////////////////////////////////////////////
179
179
// Collection methods
180
180
// ////////////////////////////////////////////////////////////////////
181
+ public:
181
182
class AudibleInfoClass : public MultiListObjectClass , public AutoPoolClass <AudibleInfoClass, 64 >
182
183
{
183
184
public:
@@ -193,6 +194,7 @@ class SoundSceneClass
193
194
float distance2;
194
195
};
195
196
197
+ protected:
196
198
typedef MultiListClass<AudibleInfoClass> COLLECTED_SOUNDS;
197
199
198
200
virtual void Collect_Audible_Sounds (Listener3DClass *listener, COLLECTED_SOUNDS &list);
Original file line number Diff line number Diff line change @@ -1220,7 +1220,8 @@ WWAudioClass::Remove_From_Playlist (AudibleSoundClass *sound_obj)
1220
1220
if (sound_obj != NULL ) {
1221
1221
1222
1222
// Loop through all the entries in the playlist
1223
- for (int index = 0 ; (index < m_Playlist.Count ()) && (retval == false ); index ++) {
1223
+ int index = 0 ;
1224
+ for (; (index < m_Playlist.Count ()) && (retval == false ); index ++) {
1224
1225
1225
1226
// Is this the entry we are looking for?
1226
1227
if (sound_obj == m_Playlist[index]) {
You can’t perform that action at this time.
0 commit comments