comparison data/model/DenseTimeValueModel.h @ 1326:54af1e21705c 3.0-integration

Update to use bqvec allocator for float vectors
author Chris Cannam
date Tue, 13 Dec 2016 15:23:21 +0000
parents 4d9816ba0ebe
children c01cbe41aeb5
comparison
equal deleted inserted replaced
1325:3aea4f7617bb 1326:54af1e21705c
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _DENSE_TIME_VALUE_MODEL_H_ 16 #ifndef SV_DENSE_TIME_VALUE_MODEL_H
17 #define _DENSE_TIME_VALUE_MODEL_H_ 17 #define SV_DENSE_TIME_VALUE_MODEL_H
18 18
19 #include <QObject> 19 #include <QObject>
20 20
21 #include "Model.h" 21 #include "Model.h"
22 22
62 * file was reached. 62 * file was reached.
63 * 63 *
64 * If the channel is given as -1, mix all available channels and 64 * If the channel is given as -1, mix all available channels and
65 * return the result. 65 * return the result.
66 */ 66 */
67 virtual std::vector<float> getData(int channel, sv_frame_t start, sv_frame_t count) const = 0; 67 virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count)
68 const = 0;
68 69
69 /** 70 /**
70 * Get the specified set of samples from given contiguous range of 71 * Get the specified set of samples from given contiguous range of
71 * channels of the model in single-precision floating-point 72 * channels of the model in single-precision floating-point
72 * format. Returned vector may have fewer samples than requested, 73 * format. Returned vector may have fewer samples than requested,
73 * if the end of file was reached. 74 * if the end of file was reached.
74 */ 75 */
75 virtual std::vector<std::vector<float>> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const = 0; 76 virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel,
77 int tochannel,
78 sv_frame_t start,
79 sv_frame_t count)
80 const = 0;
76 81
77 virtual bool canPlay() const { return true; } 82 virtual bool canPlay() const { return true; }
78 virtual QString getDefaultPlayClipId() const { return ""; } 83 virtual QString getDefaultPlayClipId() const { return ""; }
79 84
80 virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const; 85 virtual QString toDelimitedDataStringSubset(QString delimiter,
86 sv_frame_t f0, sv_frame_t f1)
87 const;
81 88
82 QString getTypeName() const { return tr("Dense Time-Value"); } 89 QString getTypeName() const { return tr("Dense Time-Value"); }
83 }; 90 };
84 91
85 #endif 92 #endif