diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-09-30 01:44:02 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-09-30 01:44:02 +0200 |
commit | f740588780897a2d9d0b29724d617b0eaa9b5025 (patch) | |
tree | 2d9bb7a9ae9d10a2ebfceba7179b47c249b3e19a /src/audio | |
parent | Population and many small classes done, mouse AUX buttons, Frontend, Hud, fixes (diff) | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.gz re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.bz2 re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.lz re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.xz re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.zst re3-f740588780897a2d9d0b29724d617b0eaa9b5025.zip |
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/AudioLogic.cpp | 4 | ||||
-rw-r--r-- | src/audio/AudioManager.cpp | 6 | ||||
-rw-r--r-- | src/audio/AudioManager.h | 4 | ||||
-rw-r--r-- | src/audio/sampman_null.cpp | 10 |
4 files changed, 14 insertions, 10 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 6865b7ae..18fe4fc5 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -3646,7 +3646,7 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol) } bool -cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq) +cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq) { const float SOUND_INTENSITY = 170.0f; @@ -3678,7 +3678,7 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq) } bool -cAudioManager::SetupJumboEngineSound(uint8 vol, int32 freq) +cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq) { const float SOUND_INTENSITY = 180.0f; if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY) diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index c0a70e31..f230731b 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -811,7 +811,11 @@ cAudioManager::ProcessActiveQueues() if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) { int32 freq; if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) { - freq = Max(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency - 6000); +#ifdef FIX_BUGS + freq = Max((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency - 6000); +#else + freq = Max((int32)sample.m_nFrequency, int32(m_asActiveSamples[j].m_nFrequency - 6000)); +#endif } else { freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000); } diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 949de7d1..0b9dd4f7 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -405,11 +405,11 @@ public: void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); void SetUpOneShotCollisionSound(const cAudioCollision &col); bool SetupCrimeReport(); - bool SetupJumboEngineSound(uint8 vol, int32 freq); + bool SetupJumboEngineSound(uint8 vol, uint32 freq); bool SetupJumboFlySound(uint8 emittingVol); bool SetupJumboRumbleSound(uint8 emittingVol); bool SetupJumboTaxiSound(uint8 vol); - bool SetupJumboWhineSound(uint8 emittingVol, int32 freq); + bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); void SetupPedComments(cPedParams *params, uint32 sound); void SetupSuspectLastSeenReport(); diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp index 7aab0d09..e9a9eaa1 100644 --- a/src/audio/sampman_null.cpp +++ b/src/audio/sampman_null.cpp @@ -6,7 +6,7 @@ cSampleManager SampleManager; bool _bSampmanInitialised = false; -uint32 BankStartOffset[MAX_SAMPLEBANKS]; +uint32 BankStartOffset[MAX_SFX_BANKS]; uint32 nNumMP3s; cSampleManager::cSampleManager(void) @@ -136,20 +136,20 @@ cSampleManager::SetMonoMode(uint8 nMode) bool cSampleManager::LoadSampleBank(uint8 nBank) { - ASSERT( nBank < MAX_SAMPLEBANKS ); + ASSERT( nBank < MAX_SFX_BANKS ); return false; } void cSampleManager::UnloadSampleBank(uint8 nBank) { - ASSERT( nBank < MAX_SAMPLEBANKS ); + ASSERT( nBank < MAX_SFX_BANKS ); } bool cSampleManager::IsSampleBankLoaded(uint8 nBank) { - ASSERT( nBank < MAX_SAMPLEBANKS ); + ASSERT( nBank < MAX_SFX_BANKS ); return false; } @@ -179,7 +179,7 @@ cSampleManager::LoadPedComment(uint32 nComment) int32 cSampleManager::GetBankContainingSound(uint32 offset) { - return SAMPLEBANK_INVALID; + return INVALID_SFX_BANK; } int32 |