comparison transform/CSVFeatureWriter.cpp @ 1039:b14064bd1f97 cxx11

This code now compiles. Main problem: sample rate types
author Chris Cannam
date Tue, 03 Mar 2015 17:09:19 +0000
parents d74ebd2d2c49
children 26cf6d5251ec
comparison
equal deleted inserted replaced
1038:cc27f35aa75c 1039:b14064bd1f97
131 throw FailedToOpenOutputStream(trackId, transformId); 131 throw FailedToOpenOutputStream(trackId, transformId);
132 } 132 }
133 133
134 QTextStream &stream = *sptr; 134 QTextStream &stream = *sptr;
135 135
136 int n = features.size(); 136 int n = (int)features.size();
137 137
138 if (n == 0) return; 138 if (n == 0) return;
139 139
140 DataId tt(trackId, transform); 140 DataId tt(trackId, transform);
141 141
221 haveDuration = false; 221 haveDuration = false;
222 } 222 }
223 223
224 if (m_sampleTiming) { 224 if (m_sampleTiming) {
225 225
226 float rate = transform.getSampleRate(); 226 int rate = int(lrintf(transform.getSampleRate()));
227 227
228 stream << Vamp::RealTime::realTime2Frame(f.timestamp, rate); 228 stream << Vamp::RealTime::realTime2Frame(f.timestamp, rate);
229 229
230 if (haveDuration) { 230 if (haveDuration) {
231 stream << m_separator; 231 stream << m_separator;