comparison 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
comparison
equal deleted inserted replaced
1215:f50ded4b951c 1221:a1b97df9962e
24 24
25 #include <QFileInfo> 25 #include <QFileInfo>
26 #include <QTextStream> 26 #include <QTextStream>
27 27
28 #include <iostream> 28 #include <iostream>
29 #include <unistd.h> 29 //#include <unistd.h>
30 #include <cmath> 30 #include <cmath>
31 #include <sndfile.h> 31 #include <sndfile.h>
32 32
33 #include <cassert> 33 #include <cassert>
34 34
612 612
613 #ifdef DEBUG_WAVE_FILE_MODEL 613 #ifdef DEBUG_WAVE_FILE_MODEL
614 cerr << "ReadOnlyWaveFileModel::fill inner loop: frame = " << frame << ", count = " << m_frameCount << ", blocksize " << readBlockSize << endl; 614 cerr << "ReadOnlyWaveFileModel::fill inner loop: frame = " << frame << ", count = " << m_frameCount << ", blocksize " << readBlockSize << endl;
615 #endif 615 #endif
616 616
617 if (updating && (frame + readBlockSize > m_frameCount)) break; 617 if (updating && (frame + readBlockSize > m_frameCount)) {
618 m_model.m_mutex.lock(); // must be locked on exiting loop
619 break;
620 }
618 621
619 block = m_model.m_reader->getInterleavedFrames(frame, readBlockSize); 622 block = m_model.m_reader->getInterleavedFrames(frame, readBlockSize);
620 623
621 sv_frame_t gotBlockSize = block.size() / channels; 624 sv_frame_t gotBlockSize = block.size() / channels;
622 625