From 26cc236bcae2c163f5696e1a92ec7e9cff62aa53 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 31 Mar 2003 22:20:11 +0000 Subject: [PATCH] rewind the sound if preload fails --- stepmania/src/RageSound.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 278f7e56f7..3b463dc4da 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -186,6 +186,10 @@ bool RageSound::Load(CString sSoundFilePath, int precache) delete NewSample; return true; } + + /* Preload failed. It read some data, so we need to rewind the + * reader. */ + NewSample->SetPosition_Fast(0); delete Preload; } stream.Sample = NewSample;