mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-17 19:24:52 -04:00
Fix loading samples unsupported by libsndfile (#6918)
This commit is contained in:
@@ -305,10 +305,6 @@ void SampleBuffer::update(bool keepSettings)
|
||||
}
|
||||
sf_close(sndFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileLoadError = FileLoadError::Invalid;
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
|
||||
@@ -337,6 +333,11 @@ void SampleBuffer::update(bool keepSettings)
|
||||
{
|
||||
m_frames = decodeSampleDS(file, buf, channels, samplerate);
|
||||
}
|
||||
|
||||
if (m_frames == 0)
|
||||
{
|
||||
fileLoadError = FileLoadError::Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_frames == 0 || fileLoadError != FileLoadError::None) // if still no frames, bail
|
||||
|
||||
Reference in New Issue
Block a user