diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index ff16335e76..5ae39eda8c 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -17,6 +17,7 @@ sm-ssc in development | 20110??? -------- * Add alternatives to Page Up and Page Down in the editor, mainly for laptop users. [Wolfman2000] +* Removed Song sample length limitations. [freem] ================================================================================ sm-ssc v1.2 | 20110107 diff --git a/src/Song.cpp b/src/Song.cpp index 9860db5b50..745fc3dd24 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -407,7 +407,7 @@ void Song::TidyUpData() } } - /* This must be done before radar calculation. */ + // This must be done before radar calculation. if( HasMusic() ) { RString error; @@ -418,7 +418,7 @@ void Song::TidyUpData() { LOG->UserLog( "Sound file", GetMusicPath(), "couldn't be opened: %s", error.c_str() ); - /* Don't use this file. */ + // Don't use this file. m_sMusicFile = ""; } else if ( Sample != NULL ) @@ -428,7 +428,7 @@ void Song::TidyUpData() if( m_fMusicLengthSeconds < 0 ) { - /* It failed; bad file or something. It's already logged a warning. */ + // It failed; bad file or something. It's already logged a warning. m_fMusicLengthSeconds = 100; // guess } else if( m_fMusicLengthSeconds == 0 ) @@ -490,13 +490,10 @@ void Song::TidyUpData() m_fMusicSampleStartSeconds = this->GetElapsedTimeFromBeat( (float)iBeat ); } } - - /* Some DWIs have lengths in ms when they meant seconds, eg. #SAMPLELENGTH:10;. - * If the sample length is way too short, change it. */ - // oh also this means that if you try to have a sample length longer - // than 30 seconds, it won't work. -aj - if( m_fMusicSampleLengthSeconds < 3 || m_fMusicSampleLengthSeconds > 30 ) + // The old logic meant that you couldn't have sample lengths that go forever, + // e.g. those in Donkey Konga. I never liked that. -freem + if( m_fMusicSampleLengthSeconds <= 0.00f ) m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH; // Here's the problem: We have a directory full of images. We want to determine which