Completed idAudioOpenALSystemLocal::BeginRegistration and idAudioOpenALSystemLocal::ClearSoundBuffer

Completed idAudioOpenALSystemLocal::BeginRegistration and idAudioOpenALSystemLocal::ClearSoundBuffer

diff --git a/src/engine/platform/Linux/systemUnix.cpp b/src/engine/platform/Linux/systemUnix.cpp
index 7af57d7..8dadbcc 100644
--- a/src/engine/platform/Linux/systemUnix.cpp
+++ b/src/engine/platform/Linux/systemUnix.cpp
@@ -1023,7 +1023,7 @@ idSystemLocal::IsNumLockDown
 */
 bool idSystemLocal::IsNumLockDown( void )
 {
-        return (SDL_GetModState() & KMOD_NUM) == KMOD_NUM;
+    return ( SDL_GetModState() & KMOD_NUM ) == KMOD_NUM;
 }
 
 #ifdef MACOS_X
diff --git a/src/engine/soundSystem/sndSystem_dma.cpp b/src/engine/soundSystem/sndSystem_dma.cpp
index 6b1a7a3..7088b54 100644
--- a/src/engine/soundSystem/sndSystem_dma.cpp
+++ b/src/engine/soundSystem/sndSystem_dma.cpp
@@ -791,7 +791,7 @@ void SOrig_StartSound( vec3_t origin, sint entityNum, sint entchannel, sfxHandle
 
 /*
 ==================
-S_StartLocalSound
+SOrig_StartLocalSound
 ==================
 */
 void SOrig_StartLocalSound( sfxHandle_t sfxHandle, sint channelNum )
@@ -813,7 +813,7 @@ void SOrig_StartLocalSound( sfxHandle_t sfxHandle, sint channelNum )
 
 /*
 ==================
-S_ClearSoundBuffer
+SOrig_ClearSoundBuffer
 
 If we are about to perform file access, clear the buffer
 so sound doesn't stutter.
diff --git a/src/engine/soundSystemAL/sndSystemAL_main.cpp b/src/engine/soundSystemAL/sndSystemAL_main.cpp
index 7ab00d6..08e9890 100644
--- a/src/engine/soundSystemAL/sndSystemAL_main.cpp
+++ b/src/engine/soundSystemAL/sndSystemAL_main.cpp
@@ -426,6 +426,8 @@ idAudioOpenALSystemLocal::BeginRegistration
 */
 void idAudioOpenALSystemLocal::BeginRegistration( void )
 {
+    // Initialize buffers
+    buf_init();
 }
 
 /*
@@ -435,6 +437,8 @@ idAudioOpenALSystemLocal::ClearSoundBuffer
 */
 void idAudioOpenALSystemLocal::ClearSoundBuffer( void )
 {
+    src_shutdown();
+    src_init();
 }
 
 idSoundSystem* soundSystem;

GitHub
sha: 348fdea1