changeset 680:a82b9d410393

Reset source sample rate when last model removed
author Chris Cannam
date Fri, 14 Jun 2019 17:19:37 +0100
parents 1f18e0f64af8
children c7406ebcd51c 155008f1bf10
files audio/AudioCallbackPlaySource.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/audio/AudioCallbackPlaySource.cpp	Thu Jun 13 20:36:10 2019 +0100
+++ b/audio/AudioCallbackPlaySource.cpp	Fri Jun 14 17:19:37 2019 +0100
@@ -358,6 +358,10 @@
 
     m_audioGenerator->removeModel(model);
 
+    if (m_models.empty()) {
+        m_sourceSampleRate = 0;
+    }
+    
     m_mutex.unlock();
 
     clearRingBuffers();