Changed preview length setting to occur when the special preview file is set in edit mode.

This commit is contained in:
Kyzentun
2015-03-11 18:55:06 -06:00
parent bd53ae2e81
commit 3140c4f30f
3 changed files with 23 additions and 18 deletions
-16
View File
@@ -627,22 +627,6 @@ void Song::TidyUpData( bool fromCache, bool /* duringCache */ )
m_fMusicLengthSeconds);
}
if(!m_PreviewFile.empty() && m_fMusicSampleStartSeconds == -1)
{
RString error;
RageSoundReader* sample= RageSoundReader_FileReader::OpenFile(GetPreviewMusicPath(), error);
if(sample == NULL)
{
LOG->UserLog( "Preview file", GetPreviewMusicPath(), "couldn't be opened: %s", error.c_str() );
m_PreviewFile= "";
}
else
{
m_fMusicSampleLengthSeconds= sample->GetLength() / 1000.0f;
delete sample;
}
}
if( m_fMusicLengthSeconds < 0 )
{
LOG->UserLog("Sound file",