Mercurial > hg > svcore
comparison data/fileio/CSVFileReader.cpp @ 1508:b837ccdd4946 import-audio-data
Catch failure to create model, e.g. because 0 channels for wave-file model
author | Chris Cannam |
---|---|
date | Tue, 04 Sep 2018 14:11:10 +0100 |
parents | f0c2b8b31609 |
children | 3299b42d8bdd |
comparison
equal
deleted
inserted
replaced
1507:fe579dc6a713 | 1508:b837ccdd4946 |
---|---|
309 (sampleRate, valueColumns); | 309 (sampleRate, valueColumns); |
310 model = modelW; | 310 model = modelW; |
311 break; | 311 break; |
312 } | 312 } |
313 | 313 |
314 if (model) { | 314 if (model && model->isOK()) { |
315 if (m_filename != "") { | 315 if (m_filename != "") { |
316 model->setObjectName(m_filename); | 316 model->setObjectName(m_filename); |
317 } | 317 } |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 if (!model || !model->isOK()) { | |
322 SVCERR << "Failed to create model to load CSV file into" | |
323 << endl; | |
324 if (model) { | |
325 delete model; | |
326 model = 0; | |
327 model1 = 0; model2 = 0; model2a = 0; model2b = 0; | |
328 model3 = 0; modelW = 0; | |
329 } | |
330 break; | |
331 } | |
332 | |
321 float value = 0.f; | 333 float value = 0.f; |
322 float pitch = 0.f; | 334 float pitch = 0.f; |
323 QString label = ""; | 335 QString label = ""; |
324 | 336 |
325 duration = 0.f; | 337 duration = 0.f; |