Ensure a decent sample length.
Apparently some versions of DWI messed this up. Thank (or blame) confuzled if this fails.
This commit is contained in:
@@ -632,7 +632,15 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
|
|||||||
out.m_fMusicSampleStartSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
out.m_fMusicSampleStartSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
||||||
|
|
||||||
else if( sValueName.EqualsNoCase("SAMPLELENGTH") )
|
else if( sValueName.EqualsNoCase("SAMPLELENGTH") )
|
||||||
out.m_fMusicSampleLengthSeconds = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
{
|
||||||
|
float sampleLength = ParseBrokenDWITimestamp(sParams[1], sParams[2], sParams[3]);
|
||||||
|
if (sampleLength > 0 && sampleLength < 1) {
|
||||||
|
// there were multiple versions of this tag allegedly: ensure a decent length if requested.
|
||||||
|
sampleLength *= 1000;
|
||||||
|
}
|
||||||
|
out.m_fMusicSampleLengthSeconds = sampleLength;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
else if( sValueName.EqualsNoCase("FREEZE") )
|
else if( sValueName.EqualsNoCase("FREEZE") )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user