comparison data/model/DenseTimeValueModel.h @ 1086:9f4505ac9072

Tidy dense time-value model API a bit; add first simple unit test for FFT model
author Chris Cannam
date Wed, 10 Jun 2015 17:06:02 +0100
parents cc27f35aa75c
children 4d9816ba0ebe
comparison
equal deleted inserted replaced
1085:bf6f64dabe73 1086:9f4505ac9072
64 */ 64 */
65 virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count, 65 virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count,
66 float *buffer) const = 0; 66 float *buffer) const = 0;
67 67
68 /** 68 /**
69 * Get the specified set of samples from the given channel of the
70 * model in double-precision floating-point format. Return the
71 * number of samples actually retrieved.
72 * If the channel is given as -1, mix all available channels and
73 * return the result.
74 */
75 virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count,
76 double *buffer) const = 0;
77
78 /**
79 * Get the specified set of samples from given contiguous range 69 * Get the specified set of samples from given contiguous range
80 * of channels of the model in single-precision floating-point 70 * of channels of the model in single-precision floating-point
81 * format. Return the number of sample frames actually retrieved. 71 * format. Return the number of sample frames actually retrieved.
82 */ 72 */
83 virtual sv_frame_t getData(int fromchannel, int tochannel, 73 virtual sv_frame_t getMultiChannelData(int fromchannel, int tochannel,
84 sv_frame_t start, sv_frame_t count, 74 sv_frame_t start, sv_frame_t count,
85 float **buffers) const = 0; 75 float **buffers) const = 0;
86 76
87 virtual bool canPlay() const { return true; } 77 virtual bool canPlay() const { return true; }
88 virtual QString getDefaultPlayClipId() const { return ""; } 78 virtual QString getDefaultPlayClipId() const { return ""; }
89 79
90 virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const; 80 virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const;