Mercurial > hg > svcore
diff data/model/SparseModel.h @ 785:05ba4bbd2b87
Warn if the output sample rate is higher than that of the input model
author | Chris Cannam |
---|---|
date | Thu, 28 Mar 2013 17:08:04 +0000 |
parents | d373ced0e6e9 |
children | 33fca917c800 |
line wrap: on
line diff
--- a/data/model/SparseModel.h Thu Mar 28 10:01:55 2013 +0000 +++ b/data/model/SparseModel.h Thu Mar 28 17:08:04 2013 +0000 @@ -436,11 +436,15 @@ PointListConstIterator i = i0; for (i = i0; i != i1; ++i) { +// std::cerr << "i->frame is " << i->frame << ", wanting " << frame << std::endl; + if (i->frame < (int)frame) { continue; } if (indexAtFrame > 0) { --indexAtFrame; continue; } return i; } +// std::cerr << "returning i with i->frame = " << i->frame << std::endl; + if (indexAtFrame > 0) { std::cerr << "WARNING: SparseModel::getPointListIteratorForRow: No iterator available for row " << row << " (frame = " << frame << ", index at frame = " << initialIndexAtFrame << ", leftover index " << indexAtFrame << ")" << std::endl; } @@ -598,6 +602,7 @@ QMutexLocker locker(&m_mutex); if (m_resolution == 0) { +// std::cerr << "getPointIterators: resolution == 0, returning end()" << std::endl; startItr = m_points.end(); endItr = m_points.end(); return; @@ -609,7 +614,7 @@ PointType startPoint(start), endPoint(end); // std::cerr << "getPointIterators: start frame " << start << ", end frame " << end << ", m_resolution " << m_resolution << std::endl; - + startItr = m_points.lower_bound(startPoint); endItr = m_points.upper_bound(endPoint); }