changeset 1182:6605984fa98f 3.0-integration

Merge from branch bqresample
author Chris Cannam
date Fri, 09 Dec 2016 18:01:55 +0000
parents db90fee630bc (current diff) e0ac21f07ab0 (diff)
children 57d192e26331 97d0c798c2ac
files
diffstat 3 files changed, 13 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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)");
         }
     }
 
--- 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;
 }
--- 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