mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 00:51:21 +01:00
More uses of min and max
This commit is contained in:
@@ -395,15 +395,14 @@ int SimpleBlockFile::ReadData(samplePtr data, sampleFormat format,
|
||||
{
|
||||
//wxLogDebug("SimpleBlockFile::ReadData(): Data are already in cache.");
|
||||
|
||||
if (len > mLen - start)
|
||||
len = mLen - start;
|
||||
len = std::min(len, std::max(start, mLen) - start);
|
||||
CopySamples(
|
||||
(samplePtr)(((char*)mCache.sampleData) +
|
||||
start * SAMPLE_SIZE(mCache.format)),
|
||||
mCache.format, data, format, len);
|
||||
return len;
|
||||
} else
|
||||
{
|
||||
}
|
||||
else {
|
||||
//wxLogDebug("SimpleBlockFile::ReadData(): Reading data from disk.");
|
||||
|
||||
SF_INFO info;
|
||||
|
||||
Reference in New Issue
Block a user