# HG changeset patch # User Chris Cannam # Date 1434482903 -3600 # Node ID e86a7ea3dc38d6b2d4a5523054a17bb359aea85e # Parent 12f3b48668d4baddf566612beef3e359e8e71db8 Fix a cache-related dumbitude diff -r 12f3b48668d4 -r e86a7ea3dc38 base/StorageAdviser.cpp --- 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; diff -r 12f3b48668d4 -r e86a7ea3dc38 data/fileio/CodedAudioFileReader.cpp --- 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; } diff -r 12f3b48668d4 -r e86a7ea3dc38 data/fileio/WavFileReader.cpp --- 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; }