From 2dc59988bfde69454176aa8c2fc69136ea9d2706 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 12 Jan 2003 04:24:38 +0000 Subject: [PATCH] add explicit sample length check --- stepmania/src/Song.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 5463c62049..50de6c7c08 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -421,6 +421,11 @@ void Song::TidyUpData() if( m_fMusicSampleStartSeconds == 0 ) m_fMusicSampleStartSeconds = this->GetElapsedTimeFromBeat( 100 ); + /* Some DWIs have lengths in ms when they meant seconds, eg. #SAMPLELENGTH:10;. + * If the sample length is way too short, change it. */ + if( m_fMusicSampleLengthSeconds < 3 ) + m_fMusicSampleLengthSeconds = 10; + // // 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.