Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 552:8c11ca1ebc39 bqresample
Some fixes to sample rate management
author | Chris Cannam |
---|---|
date | Fri, 09 Dec 2016 13:46:34 +0000 |
parents | b9d8c7a690d6 |
children | 21e3aab6e3e7 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Wed Dec 07 13:57:45 2016 +0000 +++ b/framework/MainWindowBase.cpp Fri Dec 09 13:46:34 2016 +0000 @@ -1402,7 +1402,9 @@ if (Preferences::getInstance()->getFixedSampleRate() != 0) { rate = Preferences::getInstance()->getFixedSampleRate(); } else if (Preferences::getInstance()->getResampleOnLoad()) { - rate = m_playSource->getSourceSampleRate(); + if (getMainModel()) { + rate = getMainModel()->getSampleRate(); + } } ReadOnlyWaveFileModel *newModel = new ReadOnlyWaveFileModel(source, rate); @@ -2161,7 +2163,9 @@ if (getMainModel()) { rate = getMainModel()->getSampleRate(); } else if (Preferences::getInstance()->getResampleOnLoad()) { - rate = m_playSource->getSourceSampleRate(); + if (getMainModel()) { + rate = getMainModel()->getSampleRate(); + } } RDFImporter importer