From 6e602f89c9e2a30687ea0216dc51d02780481247 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 14 Nov 2004 04:29:33 +0000 Subject: [PATCH] preload after resample, not before --- stepmania/src/RageSound.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 44a876024b..248b97eafd 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -187,12 +187,13 @@ bool RageSound::Load( CString sSoundFilePath, int precache ) pSound = new RageSoundReader_Silence; } - /* Try to precache. */ - if( precache ) - RageSoundReader_Preload::PreloadSound( pSound ); - LoadSoundReader( pSound ); + /* Try to precache. Do this after calling LoadSoundReader() to put the + * sound in this->Sample, so we preload after resampling. */ + if( precache ) + RageSoundReader_Preload::PreloadSound( Sample ); + m_sFilePath = sSoundFilePath; m_Mutex.SetName( ssprintf("RageSound (%s)", Basename(sSoundFilePath).c_str() ) );