From a064b3a687b6ba4b112eaf1e69738b27358baabf Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 26 Jul 2021 04:18:41 +0300 Subject: Audio changes: - Reorder AudioCollision.cpp functions into original order - Add missing cAudioCollision::Reset() - Move cAudioCollision ctor into .h (like original) - Fix argument types for ped comment functions and more - Fix wrong names of ped comment functions - Fix incorrect ped comments - Remove getters - Reorder declarations of cAudioManager - Wrap PC only functions around ifdef - Add cAudioManager methods from PS2 and mobile --- src/audio/sampman_miles.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/audio/sampman_miles.cpp') diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index d529513d..7c40d15d 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1245,7 +1245,7 @@ cSampleManager::Initialise(void) int32 randval; if ( bUseRandomTable ) - randval = AudioManager.GetRandomNumber(1); + randval = AudioManager.m_anRandomTable[1]; else randval = localtm->tm_sec * localtm->tm_min; @@ -1256,7 +1256,7 @@ cSampleManager::Initialise(void) randmp3 = randmp3->pNext; if ( bUseRandomTable ) - _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength; + _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength; else { if ( localtm->tm_sec > 0 ) @@ -1265,7 +1265,7 @@ cSampleManager::Initialise(void) _CurMP3Pos = s*s*s*s*s*s*s*s % randmp3->nTrackLength; } else - _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength; + _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength; } } else @@ -1345,7 +1345,7 @@ cSampleManager::CheckForAnAudioFileOnCD(void) strcpy(filepath, m_szCDRomRootPath); #endif // #if GTA_VERSION >= GTA3_PC_11 - strcat(filepath, PS2StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]); + strcat(filepath, PS2StreamedNameTable[AudioManager.m_anRandomTable[1] % TOTAL_STREAMED_SOUNDS]); f = fopen(filepath, "rb"); if ( !f ) @@ -1360,7 +1360,7 @@ cSampleManager::CheckForAnAudioFileOnCD(void) strcpy(filepath, m_szCDRomRootPath); #endif // #if GTA_VERSION >= GTA3_PC_11 - strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]); + strcat(filepath, StreamedNameTable[AudioManager.m_anRandomTable[1] % TOTAL_STREAMED_SOUNDS]); f = fopen(filepath, "rb"); } @@ -1631,12 +1631,12 @@ cSampleManager::UpdateReverb(void) if ( !usingEAX ) return FALSE; - if ( AudioManager.GetFrameCounter() & 15 ) + if ( AudioManager.m_FrameCounter & 15 ) return FALSE; - float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM); - float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT); - float z = AudioManager.GetReflectionsDistance(REFLECTION_UP); + float y = AudioManager.m_afReflectionsDistances[REFLECTION_TOP] + AudioManager.m_afReflectionsDistances[REFLECTION_BOTTOM]; + float x = AudioManager.m_afReflectionsDistances[REFLECTION_LEFT] + AudioManager.m_afReflectionsDistances[REFLECTION_RIGHT]; + float z = AudioManager.m_afReflectionsDistances[REFLECTION_UP]; float normy = norm(y, 5.0f, 40.0f); float normx = norm(x, 5.0f, 40.0f); -- cgit v1.2.3