From e84b774166ca6b66b92d22040c270cbb0c6195b1 Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Sat, 3 May 2025 06:58:04 -0700 Subject: [PATCH] Remove an expensive but low-importance log We only see this if & when we shut down cleanly. It's not worth calculating every time we mix a sound into the buffer. --- src/arch/Sound/RageSoundDriver_Generic_Software.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index e3cae03bd5..de420207ea 100644 --- a/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -56,20 +56,10 @@ int RageSoundDriver::DecodeThread_start( void *p ) return 0; } -static int64_t g_iTotalAhead = 0; -static int g_iTotalAheadCount = 0; - RageSoundMixBuffer &RageSoundDriver::MixIntoBuffer( int iFrames, int64_t iFrameNumber, int64_t iCurrentFrame ) { ASSERT_M( m_DecodeThread.IsCreated(), "RageSoundDriver::StartDecodeThread() was never called" ); - int64_t frameDifference = iFrameNumber - iCurrentFrame + static_cast(iFrames); - if (frameDifference > 0) - { - g_iTotalAhead += frameDifference; - ++g_iTotalAheadCount; - } - static RageSoundMixBuffer mix; for( unsigned i = 0; i < ARRAYLEN(m_Sounds); ++i ) @@ -472,9 +462,6 @@ RageSoundDriver::~RageSoundDriver() m_DecodeThread.Wait(); LOG->Trace("Decode thread shut down."); LOG->Flush(); - - LOG->Info( "Mixing %f ahead in %i Mix() calls", - float(g_iTotalAhead) / std::max( g_iTotalAheadCount, 1 ), g_iTotalAheadCount ); } }