From 70358d90b4d75a9fb38c962e6355a52c016cbd59 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 15:30:33 +0100 Subject: Backport fix from re3 --- src/audio/oal/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audio') diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index 81a78381..4523b07a 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -4,7 +4,7 @@ #include "stream.h" #include "sampman.h" -#ifdef _WIN32 +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #ifdef AUDIO_OAL_USE_SNDFILE #pragma comment( lib, "libsndfile-1.lib" ) #endif -- cgit v1.2.3 From c7b905c0ec9ce2ff39bf74b5bfc832645a1c6ef1 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:06:27 +0100 Subject: More checks before autolinking --- src/audio/sampman_miles.cpp | 2 ++ src/audio/sampman_oal.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/audio') diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 2a4286eb..2a9b4a13 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -18,7 +18,9 @@ #include "Timer.h" #include "crossplatform.h" +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #pragma comment( lib, "mss32.lib" ) +#endif // --MIAMI: file done diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index ce6458e6..27b60e8f 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -38,7 +38,7 @@ //TODO: max channels //TODO: loop count -#ifdef _WIN32 +#if defined _MSC_VER && !defined RE3_NO_AUTOLINK #pragma comment( lib, "OpenAL32.lib" ) #endif -- cgit v1.2.3 From 1082b138301767a73877af30509712f7c6f5f6ee Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:15:36 +0100 Subject: RE3_NO_AUTOLINK to CMAKE_NO_AUTOLINK --- src/audio/oal/stream.cpp | 2 +- src/audio/sampman_miles.cpp | 2 +- src/audio/sampman_oal.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/audio') diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index 4523b07a..19fa4ec4 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -4,7 +4,7 @@ #include "stream.h" #include "sampman.h" -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #ifdef AUDIO_OAL_USE_SNDFILE #pragma comment( lib, "libsndfile-1.lib" ) #endif diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 2a9b4a13..43c46fc4 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -18,7 +18,7 @@ #include "Timer.h" #include "crossplatform.h" -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "mss32.lib" ) #endif diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 27b60e8f..e944b05f 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -38,7 +38,7 @@ //TODO: max channels //TODO: loop count -#if defined _MSC_VER && !defined RE3_NO_AUTOLINK +#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "OpenAL32.lib" ) #endif -- cgit v1.2.3 From 7541fa7cb73870a2a5af3300c35ec9ad081ec369 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Thu, 14 Jan 2021 22:26:36 +0100 Subject: Revert extra checks before autolinking --- src/audio/sampman_miles.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/audio') diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 43c46fc4..2a4286eb 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -18,9 +18,7 @@ #include "Timer.h" #include "crossplatform.h" -#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK #pragma comment( lib, "mss32.lib" ) -#endif // --MIAMI: file done -- cgit v1.2.3 From 19749effce625c31ab6bb2bf7293fcde94048208 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 15 Jan 2021 17:54:21 +0200 Subject: Fix Jumbo Sound reseting when walking --- src/audio/AudioLogic.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/audio') diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 01b33fa5..b5127fc5 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -4106,6 +4106,7 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol) m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY; + m_sQueueSample.m_bReleasingSoundFlag = false; m_sQueueSample.m_nReleasingVolumeDivider = 5; m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bRequireReflection = false; // todo port fix to re3 -- cgit v1.2.3 From d2fac784134a07b9ae6e73b02c3fb52983ba5f22 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sat, 16 Jan 2021 01:38:18 +0100 Subject: Port debug messagess for audio cache --- src/audio/sampman_oal.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/audio') diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index f53b1362..ec85fc43 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -996,12 +996,14 @@ cSampleManager::Initialise(void) #ifdef AUDIO_CACHE FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb"); if (cacheFile) { + debug("Loadind audio cache (If game crashes around here, then your cache is corrupted, remove audio/sound.cache)\n"); fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); fclose(cacheFile); } else -#endif { - + debug("Cannot load audio cache\n"); +#endif + for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ ) { aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000); @@ -1019,10 +1021,15 @@ cSampleManager::Initialise(void) } #ifdef AUDIO_CACHE cacheFile = fcaseopen("audio\\sound.cache", "wb"); - fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); - fclose(cacheFile); -#endif + if(cacheFile) { + debug("Saving audio cache\n"); + fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile); + fclose(cacheFile); + } else { + debug("Cannot save audio cache\n"); + } } +#endif { if ( !InitialiseSampleBanks() ) -- cgit v1.2.3