From cc5a015a5f9d60247d6f27665c3e497b8a3e7751 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 18 Feb 2004 08:23:33 +0000 Subject: [PATCH] diagnostic --- stepmania/src/arch/Sound/DSoundHelpers.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stepmania/src/arch/Sound/DSoundHelpers.cpp b/stepmania/src/arch/Sound/DSoundHelpers.cpp index f2bd67a212..f1a8f09021 100644 --- a/stepmania/src/arch/Sound/DSoundHelpers.cpp +++ b/stepmania/src/arch/Sound/DSoundHelpers.cpp @@ -463,8 +463,14 @@ void DSoundBuf::Stop() { buf->Stop(); buf->SetCurrentPosition(0); + last_cursor_pos = write_cursor = buffer_bytes_filled = 0; LastPosition = 0; + + /* When stopped and rewound, the play and write cursors should both be 0. */ + DWORD play, write; + buf->GetCurrentPosition( &play, &write ); + RAGE_ASSERT_M( play == 0 && write == 0, ssprintf("%i, %i", play, write) ); } /*