comparison data/model/Model.h @ 1451:b40f67578976 streaming-csv-writer

Update getEndFrame so as to refer explicitly to final frame + 1 (consistent with selection semantics and existing wave model)
author Chris Cannam
date Tue, 17 Apr 2018 10:37:15 +0100
parents 48e9f538e6e9
children 6e9615bde1f9
comparison
equal deleted inserted replaced
1450:a12fd0456f0c 1451:b40f67578976
51 * Return the first audio frame spanned by the model. 51 * Return the first audio frame spanned by the model.
52 */ 52 */
53 virtual sv_frame_t getStartFrame() const = 0; 53 virtual sv_frame_t getStartFrame() const = 0;
54 54
55 /** 55 /**
56 * Return the last audio frame spanned by the model. 56 * Return the audio frame at the end of the model, i.e. 1 more
57 * than the final frame contained within the model. The end frame
58 * minus the start frame should yield the total duration in frames
59 * spanned by the model. This is consistent with the definition of
60 * the end frame of a Selection object.
57 */ 61 */
58 virtual sv_frame_t getEndFrame() const = 0; 62 virtual sv_frame_t getEndFrame() const = 0;
59 63
60 /** 64 /**
61 * Return the frame rate in frames per second. 65 * Return the frame rate in frames per second.
218 QString indent = "", 222 QString indent = "",
219 QString extraAttributes = "") const; 223 QString extraAttributes = "") const;
220 224
221 virtual QString toDelimitedDataString(QString delimiter) const { 225 virtual QString toDelimitedDataString(QString delimiter) const {
222 return toDelimitedDataStringSubset 226 return toDelimitedDataStringSubset
223 (delimiter, getStartFrame(), getEndFrame() + 1); 227 (delimiter, getStartFrame(), getEndFrame());
224 } 228 }
225 virtual QString toDelimitedDataStringWithOptions(QString delimiter, DataExportOptions opts) const { 229 virtual QString toDelimitedDataStringWithOptions(QString delimiter, DataExportOptions opts) const {
226 return toDelimitedDataStringSubsetWithOptions 230 return toDelimitedDataStringSubsetWithOptions
227 (delimiter, opts, getStartFrame(), getEndFrame() + 1); 231 (delimiter, opts, getStartFrame(), getEndFrame());
228 } 232 }
229 virtual QString toDelimitedDataStringSubset(QString, sv_frame_t /* f0 */, sv_frame_t /* f1 */) const { 233 virtual QString toDelimitedDataStringSubset(QString, sv_frame_t /* f0 */, sv_frame_t /* f1 */) const {
230 return ""; 234 return "";
231 } 235 }
232 virtual QString toDelimitedDataStringSubsetWithOptions(QString delimiter, DataExportOptions, sv_frame_t f0, sv_frame_t f1) const { 236 virtual QString toDelimitedDataStringSubsetWithOptions(QString delimiter, DataExportOptions, sv_frame_t f0, sv_frame_t f1) const {