Mercurial > hg > svcore
comparison data/model/AggregateWaveModel.cpp @ 1556:7b4d56b01440
Debug
| author | Chris Cannam |
|---|---|
| date | Thu, 18 Oct 2018 13:09:09 +0100 |
| parents | 2c0e04062a99 |
| children | f97d64b8674f 901f37d32060 |
comparison
equal
deleted
inserted
replaced
| 1555:616d3e8a250b | 1556:7b4d56b01440 |
|---|---|
| 18 #include <iostream> | 18 #include <iostream> |
| 19 | 19 |
| 20 #include <QTextStream> | 20 #include <QTextStream> |
| 21 | 21 |
| 22 using namespace std; | 22 using namespace std; |
| 23 | |
| 24 //#define DEBUG_AGGREGATE_WAVE_FILE_MODEL 1 | |
| 23 | 25 |
| 24 PowerOfSqrtTwoZoomConstraint | 26 PowerOfSqrtTwoZoomConstraint |
| 25 AggregateWaveModel::m_zoomConstraint; | 27 AggregateWaveModel::m_zoomConstraint; |
| 26 | 28 |
| 27 AggregateWaveModel::AggregateWaveModel(ChannelSpecList channelSpecs) : | 29 AggregateWaveModel::AggregateWaveModel(ChannelSpecList channelSpecs) : |
| 78 | 80 |
| 79 bool ready = true; | 81 bool ready = true; |
| 80 for (ChannelSpecList::const_iterator i = m_components.begin(); | 82 for (ChannelSpecList::const_iterator i = m_components.begin(); |
| 81 i != m_components.end(); ++i) { | 83 i != m_components.end(); ++i) { |
| 82 int completionHere = 100; | 84 int completionHere = 100; |
| 83 if (!i->model->isReady(&completionHere)) ready = false; | 85 if (!i->model->isReady(&completionHere)) { |
| 86 ready = false; | |
| 87 } | |
| 84 if (completion && completionHere < *completion) { | 88 if (completion && completionHere < *completion) { |
| 85 *completion = completionHere; | 89 *completion = completionHere; |
| 86 } | 90 } |
| 87 } | 91 } |
| 92 | |
| 93 #ifdef DEBUG_AGGREGATE_WAVE_FILE_MODEL | |
| 94 SVDEBUG << "AggregateWaveModel(" << objectName() | |
| 95 << ")::isReady: returning " << ready << endl; | |
| 96 #endif | |
| 97 | |
| 88 return ready; | 98 return ready; |
| 89 } | 99 } |
| 90 | 100 |
| 91 sv_frame_t | 101 sv_frame_t |
| 92 AggregateWaveModel::getFrameCount() const | 102 AggregateWaveModel::getFrameCount() const |
