Mercurial > hg > svcore
changeset 1103:e86a7ea3dc38 simple-fft-model
Fix a cache-related dumbitude
author | Chris Cannam |
---|---|
date | Tue, 16 Jun 2015 20:28:23 +0100 |
parents | 12f3b48668d4 |
children | 393134235fa0 |
files | base/StorageAdviser.cpp data/fileio/CodedAudioFileReader.cpp data/fileio/WavFileReader.cpp |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/base/StorageAdviser.cpp Mon Jun 15 19:32:30 2015 +0100 +++ b/base/StorageAdviser.cpp Tue Jun 16 20:28:23 2015 +0100 @@ -91,7 +91,7 @@ ssize_t maxmb = ssize_t(maximumSize / 1024 + 1); if (memoryFree == -1) memoryStatus = Unknown; - else if (memoryFree < memoryTotal / 3) memoryStatus = Insufficient; + else if (memoryFree < memoryTotal / 3 && memoryFree < 512) memoryStatus = Insufficient; else if (minmb > (memoryFree * 3) / 4) memoryStatus = Insufficient; else if (maxmb > (memoryFree * 3) / 4) memoryStatus = Marginal; else if (minmb > (memoryFree / 3)) memoryStatus = Marginal;
--- a/data/fileio/CodedAudioFileReader.cpp Mon Jun 15 19:32:30 2015 +0100 +++ b/data/fileio/CodedAudioFileReader.cpp Tue Jun 16 20:28:23 2015 +0100 @@ -467,7 +467,7 @@ if (m_normalised) { for (auto &f: frames) f *= m_gain; } - + return frames; }
--- a/data/fileio/WavFileReader.cpp Mon Jun 15 19:32:30 2015 +0100 +++ b/data/fileio/WavFileReader.cpp Tue Jun 16 20:28:23 2015 +0100 @@ -157,7 +157,6 @@ sv_frame_t n = count * m_fileInfo.channels; data.resize(n); - m_buffer = data; m_lastStart = start; m_lastCount = count; @@ -166,6 +165,7 @@ return {}; } + m_buffer = data; return data; }