From ef3bc7a554107851a7b9564092dca9be9c90e1d8 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 11 Sep 2002 06:01:07 +0000 Subject: [PATCH] added default sample start value --- stepmania/src/Song.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 86113c54a9..e0972cceef 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -45,7 +45,7 @@ #include "NotesLoaderKSF.h" #include "NotesWriterDWI.h" -const int FILE_CACHE_VERSION = 67; // increment this when Song or Notes changes to invalidate cache +const int FILE_CACHE_VERSION = 68; // increment this when Song or Notes changes to invalidate cache int CompareBPMSegments(const void *arg1, const void *arg2) @@ -423,6 +423,12 @@ void Song::TidyUpData() m_fMusicLengthSeconds = sound.GetLengthSeconds(); + // We're going to try and do something intelligent here... + // The MusicSampleStart always seems to be about 100-120 beats into + // the song regardless of BPM. Let's take a shot-in-the dark guess. + if( m_fMusicSampleStartSeconds == 0 ) + m_fMusicSampleStartSeconds = this->GetElapsedTimeFromBeat( 100 ); + // // Here's the problem: We have a directory full of images. We want to determine which // image is the banner, which is the background, and which is the CDTitle.