diff audio/AudioCallbackPlaySource.cpp @ 765:eae885290abc

Profiling points and comment
author Chris Cannam
date Thu, 14 May 2020 16:38:37 +0100
parents e7c77c366360
children
line wrap: on
line diff
--- a/audio/AudioCallbackPlaySource.cpp	Wed May 13 14:10:58 2020 +0100
+++ b/audio/AudioCallbackPlaySource.cpp	Thu May 14 16:38:37 2020 +0100
@@ -171,6 +171,8 @@
 {
     if (m_models.find(modelId) != m_models.end()) return;
 
+    Profiler profiler("AudioCallbackPlaySource::addModel");
+    
     bool willPlay = m_audioGenerator->addModel(modelId);
 
     auto model = ModelById::get(modelId);
@@ -200,7 +202,7 @@
     if (m_sourceSampleRate == 0) {
 
         SVDEBUG << "AudioCallbackPlaySource::addModel: Source rate changing from 0 to "
-            << model->getSampleRate() << endl;
+                << model->getSampleRate() << endl;
 
         m_sourceSampleRate = model->getSampleRate();
         srChanged = true;
@@ -332,6 +334,8 @@
     auto model = ModelById::get(modelId);
     if (!model) return;
     
+    Profiler profiler("AudioCallbackPlaySource::removeModel");
+
     m_mutex.lock();
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
@@ -885,6 +889,8 @@
 void
 AudioCallbackPlaySource::rebuildRangeLists()
 {
+    Profiler profiler("AudioCallbackPlaySource::rebuildRangeLists");
+    
     bool constrained = (m_viewManager->getPlaySelectionMode());
 
     m_rangeStarts.clear();