Mercurial > hg > svcore
diff data/model/DenseThreeDimensionalModel.h @ 1173:abb78e824820 3.0-integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Fri, 04 Mar 2016 12:38:20 +0000 |
parents | 546d4e417346 fa1bec83441e |
children | fd40a5335968 |
line wrap: on
line diff
--- a/data/model/DenseThreeDimensionalModel.h Wed Mar 02 16:16:36 2016 +0000 +++ b/data/model/DenseThreeDimensionalModel.h Fri Mar 04 12:38:20 2016 +0000 @@ -144,12 +144,12 @@ { switch (column) { case 0: { - RealTime rt = RealTime::frame2RealTime(row * getResolution(), - getSampleRate()); + RealTime rt = RealTime::frame2RealTime + (row * getResolution() + getStartFrame(), getSampleRate()); return rt.toText().c_str(); } case 1: - return int(row * getResolution()); + return int(row * getResolution() + getStartFrame()); default: return getValueAt(row, column - 2); } @@ -163,10 +163,10 @@ } virtual sv_frame_t getFrameForRow(int row) const { - return sv_frame_t(row) * getResolution(); + return sv_frame_t(row) * getResolution() + getStartFrame(); } virtual int getRowForFrame(sv_frame_t frame) const { - return int(frame / getResolution()); + return int((frame - getStartFrame()) / getResolution()); } protected: