Mercurial > hg > svcore
comparison data/model/DenseTimeValueModel.cpp @ 1069:32ab6c48efaa
Merge from branch tonioni
author | Chris Cannam |
---|---|
date | Mon, 20 Apr 2015 09:11:34 +0100 |
parents | cc27f35aa75c |
children | 9f4505ac9072 |
comparison
equal
deleted
inserted
replaced
1036:682d64f05e72 | 1069:32ab6c48efaa |
---|---|
27 { | 27 { |
28 PlayParameterRepository::getInstance()->removePlayable(this); | 28 PlayParameterRepository::getInstance()->removePlayable(this); |
29 } | 29 } |
30 | 30 |
31 QString | 31 QString |
32 DenseTimeValueModel::toDelimitedDataStringSubset(QString delimiter, int f0, int f1) const | 32 DenseTimeValueModel::toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const |
33 { | 33 { |
34 int ch = getChannelCount(); | 34 int ch = getChannelCount(); |
35 | 35 |
36 cerr << "f0 = " << f0 << ", f1 = " << f1 << endl; | 36 cerr << "f0 = " << f0 << ", f1 = " << f1 << endl; |
37 | 37 |
40 float **all = new float *[ch]; | 40 float **all = new float *[ch]; |
41 for (int c = 0; c < ch; ++c) { | 41 for (int c = 0; c < ch; ++c) { |
42 all[c] = new float[f1 - f0]; | 42 all[c] = new float[f1 - f0]; |
43 } | 43 } |
44 | 44 |
45 int n = getData(0, ch - 1, f0, f1 - f0, all); | 45 sv_frame_t n = getData(0, ch - 1, f0, f1 - f0, all); |
46 | 46 |
47 QStringList list; | 47 QStringList list; |
48 for (int i = 0; i < n; ++i) { | 48 for (sv_frame_t i = 0; i < n; ++i) { |
49 QStringList parts; | 49 QStringList parts; |
50 parts << QString("%1").arg(f0 + i); | 50 parts << QString("%1").arg(f0 + i); |
51 for (int c = 0; c < ch; ++c) { | 51 for (int c = 0; c < ch; ++c) { |
52 parts << QString("%1").arg(all[c][i]); | 52 parts << QString("%1").arg(all[c][i]); |
53 } | 53 } |