comparison data/fileio/CSVFormat.cpp @ 1510:5f1b2a117a4f import-audio-data

Debug etc
author Chris Cannam
date Wed, 05 Sep 2018 11:56:45 +0100
parents 48e9f538e6e9
children c9c2aa17439a
comparison
equal deleted inserted replaced
1509:3299b42d8bdd 1510:5f1b2a117a4f
89 { 89 {
90 char candidates[] = { ',', '\t', ' ', '|', '/', ':' }; 90 char candidates[] = { ',', '\t', ' ', '|', '/', ':' };
91 for (int i = 0; i < int(sizeof(candidates)/sizeof(candidates[0])); ++i) { 91 for (int i = 0; i < int(sizeof(candidates)/sizeof(candidates[0])); ++i) {
92 if (StringBits::split(line, candidates[i], m_allowQuoting).size() >= 2) { 92 if (StringBits::split(line, candidates[i], m_allowQuoting).size() >= 2) {
93 m_separator = candidates[i]; 93 m_separator = candidates[i];
94 SVDEBUG << "Estimated column separator: '" << m_separator
95 << "'" << endl;
94 return; 96 return;
95 } 97 }
96 } 98 }
97 } 99 }
98 100
197 { 199 {
198 m_timingType = CSVFormat::ImplicitTiming; 200 m_timingType = CSVFormat::ImplicitTiming;
199 m_timeUnits = CSVFormat::TimeWindows; 201 m_timeUnits = CSVFormat::TimeWindows;
200 202
201 int timingColumnCount = 0; 203 int timingColumnCount = 0;
204
205 SVDEBUG << "Estimated column qualities overall: ";
206 for (int i = 0; i < m_columnCount; ++i) {
207 SVDEBUG << int(m_columnQualities[i]) << " ";
208 }
209 SVDEBUG << endl;
202 210
203 // if our first column has zero or one entries in it and the rest 211 // if our first column has zero or one entries in it and the rest
204 // have more, then we'll default to ignoring the first column and 212 // have more, then we'll default to ignoring the first column and
205 // counting the next one as primary. (e.g. Sonic Annotator output 213 // counting the next one as primary. (e.g. Sonic Annotator output
206 // with filename at start of first column.) 214 // with filename at start of first column.)