# HG changeset patch # User Chris Cannam # Date 1482165278 0 # Node ID 022d6a9e6d75f77a693d31765faead2e578cf014 # Parent ce3818cd16c578fb40dd2d30f2c94090026582aa# Parent b777379e70d851aa75ff66b677fb3bd4c79808d4 Merge from branch svg, and thus (in some subrepos) from levelpanwidget diff -r ce3818cd16c5 -r 022d6a9e6d75 audio/AudioCallbackPlaySource.cpp --- a/audio/AudioCallbackPlaySource.cpp Wed Dec 14 11:56:34 2016 +0000 +++ b/audio/AudioCallbackPlaySource.cpp Mon Dec 19 16:34:38 2016 +0000 @@ -178,6 +178,9 @@ if (m_sourceSampleRate == 0) { + SVDEBUG << "AudioCallbackPlaySource::addModel: Source rate changing from 0 to " + << model->getSampleRate() << endl; + m_sourceSampleRate = model->getSampleRate(); srChanged = true; @@ -222,6 +225,9 @@ m_sourceSampleRate, false); } else { + SVDEBUG << "AudioCallbackPlaySource::addModel: Source rate changing from " + << m_sourceSampleRate << " to " << model->getSampleRate() << endl; + m_sourceSampleRate = model->getSampleRate(); srChanged = true; } @@ -317,9 +323,15 @@ m_models.erase(model); - if (m_models.empty()) { - m_sourceSampleRate = 0; - } + // I don't think we have to do this any more: if a new model is + // loaded at a different rate, we'll hit the non-conflicting path + // in addModel and the rate will be updated without problems; but + // if a new model is loaded at the rate that we were using for the + // last one, then we save work by not having reset this here + // +// if (m_models.empty()) { +// m_sourceSampleRate = 0; +// } sv_frame_t lastEnd = 0; for (std::set::const_iterator i = m_models.begin(); diff -r ce3818cd16c5 -r 022d6a9e6d75 framework/MainWindowBase.h --- a/framework/MainWindowBase.h Wed Dec 14 11:56:34 2016 +0000 +++ b/framework/MainWindowBase.h Mon Dec 19 16:34:38 2016 +0000 @@ -50,6 +50,8 @@ class CommandHistory; class QMenu; class AudioDial; +class LevelPanWidget; +class LevelPanToolButton; class QLabel; class QCheckBox; class PreferencesDialog;