Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 360:88bf6cc73275 tonioni
For Tony, resample all audio to 44100 on load
author | Chris Cannam |
---|---|
date | Fri, 13 Jun 2014 12:56:31 +0100 |
parents | 2da91cceed64 |
children | 5302c548adad |
comparison
equal
deleted
inserted
replaced
359:1f2a4ad79967 | 360:88bf6cc73275 |
---|---|
473 | 473 |
474 file.waitForData(); | 474 file.waitForData(); |
475 | 475 |
476 size_t rate = 0; | 476 size_t rate = 0; |
477 | 477 |
478 if (!mainModel && | 478 if (Preferences::getInstance()->getFixedSampleRate() != 0) { |
479 Preferences::getInstance()->getResampleOnLoad()) { | 479 rate = Preferences::getInstance()->getFixedSampleRate(); |
480 } else if (!mainModel && | |
481 Preferences::getInstance()->getResampleOnLoad()) { | |
480 WaveFileModel *mm = m_document->getMainModel(); | 482 WaveFileModel *mm = m_document->getMainModel(); |
481 if (mm) rate = mm->getSampleRate(); | 483 if (mm) rate = mm->getSampleRate(); |
482 } | 484 } |
483 | 485 |
484 model = new WaveFileModel(file, rate); | 486 model = new WaveFileModel(file, rate); |