From d610ec2e8035ea4c729aa36b4cb2ae3a5dd41ed0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 14 Jul 2004 21:06:03 +0000 Subject: [PATCH] clamp output --- stepmania/src/RageSoundPosMap.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stepmania/src/RageSoundPosMap.cpp b/stepmania/src/RageSoundPosMap.cpp index 875769bcea..98a7db1558 100644 --- a/stepmania/src/RageSoundPosMap.cpp +++ b/stepmania/src/RageSoundPosMap.cpp @@ -2,6 +2,7 @@ #include "RageSoundPosMap.h" #include "RageLog.h" #include "RageUtil.h" +#include "RageTimer.h" /* The number of frames we should keep pos_map data for. This being too high * is mostly harmless; the data is small. */ @@ -108,9 +109,14 @@ int64_t pos_map_queue::Search( int64_t frame, bool *approximate ) const #else #define LI "%lli" #endif - LOG->Trace( "Approximate sound time: driver frame " LI ", m_Queue frame " LI ".." LI " (dist " LI "), closest position is " LI, - frame, m_Queue[closest_block].frameno, m_Queue[closest_block].frameno+m_Queue[closest_block].frames, - closest_position_dist, closest_position ); + static RageTimer last; + if( last.PeekDeltaTime() >= 1.0f ) + { + last.GetDeltaTime(); + LOG->Trace( "Approximate sound time: driver frame " LI ", m_Queue frame " LI ".." LI " (dist " LI "), closest position is " LI, + frame, m_Queue[closest_block].frameno, m_Queue[closest_block].frameno+m_Queue[closest_block].frames, + closest_position_dist, closest_position ); + } if( approximate ) *approximate = true;