comparison framework/SVFileReader.cpp @ 436:72c662fe7ea3 cxx11

Further dedicated-types fixes
author Chris Cannam
date Tue, 10 Mar 2015 17:02:52 +0000
parents 7657075ecfca
children 1c17a2c5e917
comparison
equal deleted inserted replaced
435:618d5816b04d 436:72c662fe7ea3
448 448
449 QString name = attributes.value("name"); 449 QString name = attributes.value("name");
450 450
451 SVDEBUG << "SVFileReader::readModel: model name \"" << name << "\"" << endl; 451 SVDEBUG << "SVFileReader::readModel: model name \"" << name << "\"" << endl;
452 452
453 READ_MANDATORY(int, sampleRate, toInt); 453 READ_MANDATORY(double, sampleRate, toDouble);
454 454
455 QString type = attributes.value("type").trimmed(); 455 QString type = attributes.value("type").trimmed();
456 bool isMainModel = (attributes.value("mainModel").trimmed() == "true"); 456 bool isMainModel = (attributes.value("mainModel").trimmed() == "true");
457 457
458 if (type == "wavefile") { 458 if (type == "wavefile") {
476 cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: Source unavailable" << endl; 476 cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: Source unavailable" << endl;
477 } else { 477 } else {
478 478
479 file.waitForData(); 479 file.waitForData();
480 480
481 int rate = sampleRate; 481 sv_samplerate_t rate = sampleRate;
482 482
483 if (Preferences::getInstance()->getFixedSampleRate() != 0) { 483 if (Preferences::getInstance()->getFixedSampleRate() != 0) {
484 rate = Preferences::getInstance()->getFixedSampleRate(); 484 rate = Preferences::getInstance()->getFixedSampleRate();
485 } else if (rate == 0 && 485 } else if (rate == 0 &&
486 !isMainModel && 486 !isMainModel &&