Mercurial > hg > svcore
diff data/model/ReadOnlyWaveFileModel.cpp @ 1221:a1b97df9962e 3.0-integration
Merge from branch msvc2015_64
author | Chris Cannam |
---|---|
date | Thu, 20 Oct 2016 11:16:22 +0100 |
parents | a68d407f9752 |
children | c97a28a3baeb |
line wrap: on
line diff
--- a/data/model/ReadOnlyWaveFileModel.cpp Tue Oct 18 14:03:35 2016 +0100 +++ b/data/model/ReadOnlyWaveFileModel.cpp Thu Oct 20 11:16:22 2016 +0100 @@ -26,7 +26,7 @@ #include <QTextStream> #include <iostream> -#include <unistd.h> +//#include <unistd.h> #include <cmath> #include <sndfile.h> @@ -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);