Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GeneralsMD/Code/Libraries/Source/WWVegas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ target_include_directories(z_wwcommon INTERFACE
wwshade
)

add_subdirectory(WWAudio)
add_subdirectory(WWDebug)
add_subdirectory(WWLib)
add_subdirectory(WWMath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class AudioCallbackListClass : public SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::Vector;
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::ActiveCount;
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::Delete;
using SimpleDynVecClass< AUDIO_CALLBACK_STRUCT<T> >::Add;

public:

Expand Down
54 changes: 54 additions & 0 deletions GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
set(WWAUDIO_SRC
"AABTreeSoundCullClass.h"
"AudibleSound.cpp"
"AudibleSound.h"
"AudioEvents.h"
"AudioSaveLoad.cpp"
"AudioSaveLoad.h"
"FilteredSound.cpp"
"FilteredSound.h"
"Listener.cpp"
"Listener.h"
"listenerhandle.cpp"
"listenerhandle.h"
"LogicalListener.cpp"
"LogicalListener.h"
"LogicalSound.cpp"
"LogicalSound.h"
"PriorityVector.h"
"sound2dhandle.cpp"
"sound2dhandle.h"
"Sound3D.cpp"
"Sound3D.h"
"sound3dhandle.cpp"
"sound3dhandle.h"
"SoundBuffer.cpp"
"SoundBuffer.h"
"SoundChunkIDs.h"
"SoundCullObj.h"
"soundhandle.cpp"
"soundhandle.h"
"SoundPseudo3D.cpp"
"SoundPseudo3D.h"
"SoundScene.cpp"
"SoundScene.h"
"SoundSceneObj.cpp"
"SoundSceneObj.h"
"soundstreamhandle.cpp"
"soundstreamhandle.h"
"Threads.cpp"
"Threads.h"
"Utils.cpp"
"Utils.h"
"WWAudio.cpp"
"WWAudio.h"
)

add_library(z_wwaudio STATIC)
set_target_properties(z_wwaudio PROPERTIES OUTPUT_NAME wwaudio)

target_sources(z_wwaudio PRIVATE ${WWAUDIO_SRC})

target_link_libraries(z_wwaudio PRIVATE
z_wwcommon
)
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
template<class T>
class PriorityVectorClass : public DynamicVectorClass<T>
{
using DynamicVectorClass<T>::Vector;
using DynamicVectorClass<T>::ActiveCount;

public:

virtual bool Process_Head (T &object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ SoundSceneClass::Collect_Audible_Sounds
float length2 = (pos - listener_pos).Length2 ();
if (length2 <= radius2) {

AudibleInfoClass *audible_info = W3DNEW AudibleInfoClass (sound_obj, length2);
AudibleInfoClass *audible_info = new AudibleInfoClass (sound_obj, length2);
list.Add (audible_info);

//
Expand Down Expand Up @@ -310,7 +310,7 @@ SoundSceneClass::Collect_Audible_Sounds
float length2 = (pos - listener_pos).Length2 ();
if (length2 <= radius2) {

AudibleInfoClass *audible_info = W3DNEW AudibleInfoClass (sound_obj, length2);
AudibleInfoClass *audible_info = new AudibleInfoClass (sound_obj, length2);
list.Add (audible_info);

//
Expand Down
2 changes: 2 additions & 0 deletions GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/SoundScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class SoundSceneClass
//////////////////////////////////////////////////////////////////////
// Collection methods
//////////////////////////////////////////////////////////////////////
public:
class AudibleInfoClass : public MultiListObjectClass, public AutoPoolClass<AudibleInfoClass, 64>
Comment thread
xezon marked this conversation as resolved.
Outdated
{
public:
Expand All @@ -193,6 +194,7 @@ class SoundSceneClass
float distance2;
};

protected:
typedef MultiListClass<AudibleInfoClass> COLLECTED_SOUNDS;

virtual void Collect_Audible_Sounds (Listener3DClass *listener, COLLECTED_SOUNDS &list);
Expand Down
3 changes: 2 additions & 1 deletion GeneralsMD/Code/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,8 @@ WWAudioClass::Remove_From_Playlist (AudibleSoundClass *sound_obj)
if (sound_obj != NULL) {

// Loop through all the entries in the playlist
for (int index = 0; (index < m_Playlist.Count ()) && (retval == false); index ++) {
int index = 0;
for (; (index < m_Playlist.Count ()) && (retval == false); index ++) {

// Is this the entry we are looking for?
if (sound_obj == m_Playlist[index]) {
Expand Down