From fdd8b4f9556b4201c02dbb669e3ad2d0dc064734 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 28 Oct 2003 07:10:50 +0000 Subject: [PATCH] Seamless underrun recovery (at least with ALSA). --- stepmania/src/RageSound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index c092e6dd25..07550b3f07 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -598,7 +598,7 @@ int RageSound::GetPositionSecondsInternal() const if(dist < closest_position_dist) { closest_position_dist = dist; - closest_position = pos_map[i].position; + closest_position = pos_map[i].position - dist; } /* See if the current position is close to the end of this block. */ @@ -606,7 +606,7 @@ int RageSound::GetPositionSecondsInternal() const if(dist < closest_position_dist) { closest_position_dist = dist + pos_map[i].samples; - closest_position = pos_map[i].position + pos_map[i].samples; + closest_position = pos_map[i].position + pos_map[i].samples + dist; } }