changeset 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 794b64e62e58
children a1b97df9962e
files data/midi/rtmidi/RtMidi.cpp data/model/ReadOnlyWaveFileModel.cpp
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/midi/rtmidi/RtMidi.cpp	Wed Oct 19 09:11:51 2016 +0100
+++ b/data/midi/rtmidi/RtMidi.cpp	Wed Oct 19 17:33:32 2016 +0100
@@ -63,7 +63,7 @@
 #endif
   }
   else {
-    cerr << '\n' << errorString_ << "\n\n";
+    cerr << "\nRtMidi error: " << errorString_ << "\n\n";
     throw RtError( errorString_, type );
   }
 }
--- 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);