diff data/model/ReadOnlyWaveFileModel.cpp @ 1220:a68d407f9752 msvc2015_64

Further MSVC build stuff. Committing this as-is because it's building and running now, but there's a lot to tidy up.
author Chris Cannam
date Wed, 19 Oct 2016 17:33:32 +0100
parents 6b847a59d908
children c97a28a3baeb
line wrap: on
line diff
--- a/data/model/ReadOnlyWaveFileModel.cpp	Wed Oct 19 09:11:51 2016 +0100
+++ b/data/model/ReadOnlyWaveFileModel.cpp	Wed Oct 19 17:33:32 2016 +0100
@@ -614,7 +614,10 @@
             cerr << "ReadOnlyWaveFileModel::fill inner loop: frame = " << frame << ", count = " << m_frameCount << ", blocksize " << readBlockSize << endl;
 #endif
 
-            if (updating && (frame + readBlockSize > m_frameCount)) break;
+            if (updating && (frame + readBlockSize > m_frameCount)) {
+                m_model.m_mutex.lock(); // must be locked on exiting loop
+                break;
+            }
 
             block = m_model.m_reader->getInterleavedFrames(frame, readBlockSize);