diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp index 07ed80e1fc..18ef8f81d2 100644 --- a/src/GameLoop.cpp +++ b/src/GameLoop.cpp @@ -296,13 +296,6 @@ void GameLoop::UpdateAllButDraw(bool bRunningFromVBLANK) * acting on song beat from last frame */ HandleInputEvents(fDeltaTime); - // Legacy hack to work around low sample count in some sound drivers. - // This is a workaround for a bug in the Windows sound system that causes - // the sound to be cut off if the sample count is too low. This is a - // workaround for the bug, but it's not a fix. It should probably be - // removed or localized to the DirectSound driver. --sukibaby - SOUNDMAN->low_sample_count_workaround(); - // Update the lights LIGHTSMAN->Update(fDeltaTime); } diff --git a/src/RageSoundManager.cpp b/src/RageSoundManager.cpp index 585b9977ec..e4770cc950 100644 --- a/src/RageSoundManager.cpp +++ b/src/RageSoundManager.cpp @@ -57,12 +57,6 @@ RageSoundManager::~RageSoundManager() m_mapPreloadedSounds.clear(); } - -void RageSoundManager::low_sample_count_workaround() -{ - m_pDriver->low_sample_count_workaround(); -} - /* * Previously, we went to some lengths to shut down sounds before exiting threads. * The only other thread that actually starts sounds is SOUND. Doing this was ugly; diff --git a/src/RageSoundManager.h b/src/RageSoundManager.h index 891222246d..c5cb0f8fe4 100644 --- a/src/RageSoundManager.h +++ b/src/RageSoundManager.h @@ -46,8 +46,6 @@ public: RageSoundReader *GetLoadedSound( const RString &sPath ); void AddLoadedSound( const RString &sPath, RageSoundReader_Preload *pSound ); - void low_sample_count_workaround(); - private: std::map m_mapPreloadedSounds; diff --git a/src/arch/Sound/RageSoundDriver.h b/src/arch/Sound/RageSoundDriver.h index 54a7caf5e5..28325222b2 100644 --- a/src/arch/Sound/RageSoundDriver.h +++ b/src/arch/Sound/RageSoundDriver.h @@ -52,7 +52,6 @@ public: * RageSound::CommitPlayingPosition. */ std::int64_t GetHardwareFrame( RageTimer *pTimer ) const; virtual std::int64_t GetPosition() const = 0; - void low_sample_count_workaround(); /* When a sound is finished playing (GetDataToPlay returns 0) and the sound has * been completely flushed (so GetPosition is no longer meaningful), call @@ -205,7 +204,6 @@ private: std::int64_t ClampHardwareFrame( std::int64_t iHardwareFrame ) const; mutable std::int64_t m_iMaxHardwareFrame; mutable std::int64_t m_iVMaxHardwareFrame; - mutable std::int32_t soundDriverMaxSamples = 0; bool m_bShutdownDecodeThread; diff --git a/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 032950a641..c06f1a8b73 100644 --- a/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -450,11 +450,6 @@ void RageSoundDriver::SetDecodeBufferSize( int iFrames ) frames_to_buffer = iFrames; } -void RageSoundDriver::low_sample_count_workaround() -{ - if (soundDriverMaxSamples != 0) GetHardwareFrame(nullptr); -} - RageSoundDriver::RageSoundDriver(): m_Mutex("RageSoundDriver"), m_SoundListMutex("SoundListMutex") @@ -463,7 +458,6 @@ RageSoundDriver::RageSoundDriver(): m_iMaxHardwareFrame = 0; m_iVMaxHardwareFrame = 0; SetDecodeBufferSize( 4096 ); - soundDriverMaxSamples = PREFSMAN->m_iRageSoundSampleCountClamp; m_DecodeThread.SetName("Decode thread"); }