Mercurial > hg > sonic-visualiser
diff audioio/AudioCallbackPlaySource.cpp @ 42:c0ae41c72421
* Bypass auditioning plugin on xrun
author | Chris Cannam |
---|---|
date | Wed, 04 Oct 2006 11:54:32 +0000 |
parents | fbd7a497fd89 |
children | 0739be123304 |
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp Wed Oct 04 11:01:39 2006 +0000 +++ b/audioio/AudioCallbackPlaySource.cpp Wed Oct 04 11:54:32 2006 +0000 @@ -54,6 +54,7 @@ m_outputLeft(0.0), m_outputRight(0.0), m_auditioningPlugin(0), + m_auditioningPluginBypassed(false), m_timeStretcher(0), m_fillThread(0), m_converter(0), @@ -401,6 +402,16 @@ } void +AudioCallbackPlaySource::audioProcessingOverload() +{ + RealTimePluginInstance *ap = m_auditioningPlugin; + if (ap && m_playing && !m_auditioningPluginBypassed) { + m_auditioningPluginBypassed = true; + emit audioOverloadPluginDisabled(); + } +} + +void AudioCallbackPlaySource::setTargetBlockSize(size_t size) { // std::cerr << "AudioCallbackPlaySource::setTargetBlockSize() -> " << size << std::endl; @@ -648,6 +659,7 @@ { RealTimePluginInstance *formerPlugin = m_auditioningPlugin; m_auditioningPlugin = plugin; + m_auditioningPluginBypassed = false; if (formerPlugin) m_pluginScavenger.claim(formerPlugin); } @@ -870,6 +882,7 @@ void AudioCallbackPlaySource::applyAuditioningEffect(size_t count, float **buffers) { + if (m_auditioningPluginBypassed) return; RealTimePluginInstance *plugin = m_auditioningPlugin; if (!plugin) return;