# HG changeset patch # User Chris Cannam # Date 1481306515 0 # Node ID 6605984fa98f40534b2706555979a16592733850 # Parent db90fee630bc756c3c64a6f904b551acb13e000f# Parent e0ac21f07ab02388c50ff2ad40da73b27ce9ae87 Merge from branch bqresample diff -r db90fee630bc -r 6605984fa98f view/Pane.cpp --- a/view/Pane.cpp Wed Nov 30 11:01:39 2016 +0000 +++ b/view/Pane.cpp Fri Dec 09 18:01:55 2016 +0000 @@ -1053,23 +1053,19 @@ sv_samplerate_t modelRate = waveformModel->getSampleRate(); sv_samplerate_t nativeRate = waveformModel->getNativeRate(); sv_samplerate_t playbackRate = m_manager->getPlaybackSampleRate(); - sv_samplerate_t outputRate = m_manager->getOutputSampleRate(); QString srNote = ""; - // Show (R) for waveform models that have been resampled or will - // be resampled on playback, and (X) for waveform models that will - // be played at the wrong rate because their rate differs from the - // current playback rate (which is not necessarily that of the - // main model). - - if (playbackRate != 0) { - if (modelRate == playbackRate) { - if (modelRate != outputRate || modelRate != nativeRate) { - srNote = " " + tr("(R)"); - } - } else { + // Show (R) for waveform models that have been resampled during + // load, and (X) for waveform models that will be played at the + // wrong rate because their rate differs from the current playback + // rate (which is not necessarily that of the main model). + + if (modelRate != nativeRate) { + if (playbackRate != 0 && modelRate != playbackRate) { srNote = " " + tr("(X)"); + } else { + srNote = " " + tr("(R)"); } } diff -r db90fee630bc -r 6605984fa98f view/ViewManager.cpp --- a/view/ViewManager.cpp Wed Nov 30 11:01:39 2016 +0000 +++ b/view/ViewManager.cpp Fri Dec 09 18:01:55 2016 +0000 @@ -489,10 +489,10 @@ } sv_samplerate_t -ViewManager::getOutputSampleRate() const +ViewManager::getDeviceSampleRate() const { if (m_playSource) { - return m_playSource->getTargetSampleRate(); + return m_playSource->getDeviceSampleRate(); } return 0; } diff -r db90fee630bc -r 6605984fa98f view/ViewManager.h --- a/view/ViewManager.h Wed Nov 30 11:01:39 2016 +0000 +++ b/view/ViewManager.h Fri Dec 09 18:01:55 2016 +0000 @@ -172,9 +172,9 @@ /** * The sample rate of the audio output device. If the playback * sample rate differs from this, everything will be resampled at - * the output stage. + * the output stage (but not before). */ - sv_samplerate_t getOutputSampleRate() const; + sv_samplerate_t getDeviceSampleRate() const; /** * The sample rate of the current main model. This may in theory