From a561c101890d02e02249924a9854a7b0fe0c81e4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 17 Mar 2003 20:01:05 +0000 Subject: [PATCH] fix underrun notice --- stepmania/src/arch/Sound/DSoundHelpers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/arch/Sound/DSoundHelpers.cpp b/stepmania/src/arch/Sound/DSoundHelpers.cpp index 5b75ab0fe1..096d73c6e3 100644 --- a/stepmania/src/arch/Sound/DSoundHelpers.cpp +++ b/stepmania/src/arch/Sound/DSoundHelpers.cpp @@ -210,7 +210,9 @@ bool DSoundBuf::get_output_buf(char **buffer, unsigned *bufsiz, int *play_pos, i !contained(first_byte_filled, write_cursor, cursorend)) { LOG->Trace("underrun: %i..%i filled but cursor at %i..%i (missed it by %i)", - first_byte_filled, write_cursor, cursorstart, cursorend, (cursorend - first_byte_filled + buffersize) % buffersize); + first_byte_filled, write_cursor, cursorstart, cursorend, + (cursorend - write_cursor + buffersize) % buffersize); +// (cursorend - first_byte_filled + buffersize) % buffersize); /* Pretend the space between the play and write cursor is filled * with data, and continue filling from there. */