From eb1e17db06be9e1d8a9c09b20e39a2822b730bb8 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 18 Apr 2008 03:26:48 +0000 Subject: [PATCH] - Fixed: The music stream needs to zero the FMOD_REVERB_CHANNELPROPERTIES before sending it to Channel::getReverbProperties(). - Fixed: The earthquake effect did not play its sound as an actual looping sound. I'm a bit surprised this only recently started causing problems. SVN r923 (trunk) --- docs/rh-log.txt | 6 ++++++ src/g_shared/a_quake.cpp | 11 ++++++++--- src/sound/fmodsound.cpp | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index ef7f167fe..a2cb23cc3 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,9 @@ +April 17, 2008 +- Fixed: The music stream needs to zero the FMOD_REVERB_CHANNELPROPERTIES + before sending it to Channel::getReverbProperties(). +- Fixed: The earthquake effect did not play its sound as an actual looping + sound. I'm a bit surprised this only recently started causing problems. + April 17, 2008 (Changes by Graf Zahl) - Added Martin Howe's fixes for morphing and DECORATE function prototypes. - Minor fixes in texture code. diff --git a/src/g_shared/a_quake.cpp b/src/g_shared/a_quake.cpp index 489d42591..78b3fe128 100644 --- a/src/g_shared/a_quake.cpp +++ b/src/g_shared/a_quake.cpp @@ -79,8 +79,9 @@ void DEarthquake::Tick () } if (!S_IsActorPlayingSomething (m_Spot, CHAN_BODY, m_QuakeSFX)) - S_SoundID (m_Spot, CHAN_BODY, m_QuakeSFX, 1, ATTN_NORM); - + { + S_SoundID (m_Spot, CHAN_BODY | CHAN_LOOP, m_QuakeSFX, 1, ATTN_NORM); + } if (m_DamageRadius > 0) { for (i = 0; i < MAXPLAYERS; i++) @@ -107,7 +108,11 @@ void DEarthquake::Tick () } if (--m_Countdown == 0) { - Destroy (); + if (S_IsActorPlayingSomething(m_Spot, CHAN_BODY, m_QuakeSFX)) + { + S_StopSound(m_Spot, CHAN_BODY); + } + Destroy(); } } diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 2881bb823..5a2946ee3 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -314,7 +314,7 @@ public: Channel->setSpeakerMix(1, 1, 1, 1, 1, 1, 1, 1); Channel->setVolume(volume); // Ensure reverb is disabled. - FMOD_REVERB_CHANNELPROPERTIES reverb; + FMOD_REVERB_CHANNELPROPERTIES reverb = { 0, }; if (FMOD_OK == Channel->getReverbProperties(&reverb)) { reverb.Room = -10000;