# HG changeset patch # User Chris Cannam # Date 1589470717 -3600 # Node ID eae885290abc0e2f87563a3268261f5d7a55f4d9 # Parent 4c91c95e146a782f854a44429f8bfcc145d01350 Profiling points and comment diff -r 4c91c95e146a -r eae885290abc audio/AudioCallbackPlaySource.cpp --- 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(); diff -r 4c91c95e146a -r eae885290abc audio/AudioCallbackPlaySource.h --- a/audio/AudioCallbackPlaySource.h Wed May 13 14:10:58 2020 +0100 +++ b/audio/AudioCallbackPlaySource.h Thu May 14 16:38:37 2020 +0100 @@ -399,8 +399,7 @@ void clearRingBuffers(bool haveLock = false, int count = 0); void unifyRingBuffers(); - // Called from fill thread, m_playing true, mutex held - // Return true if work done + // Called from fill thread, mutex held. Return true if work done bool fillBuffers(); // Called from fillBuffers. Return the number of frames written,