MCPcopy Create free account
hub / github.com/apohl79/audiogridder / updateNoLock

Method updateNoLock

Server/Source/ProcessorChain.cpp:294–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void ProcessorChain::updateNoLock() {
295 traceScope();
296 int latency = 0;
297 bool supportsDouble = true;
298 m_extraChannels = 0;
299 m_sidechainDisabled = false;
300 for (auto& proc : m_processors) {
301 if (nullptr != proc) {
302 latency += proc->getLatencySamples();
303 if (!proc->supportsDoublePrecisionProcessing()) {
304 supportsDouble = false;
305 }
306 m_extraChannels = jmax(m_extraChannels, proc->getExtraInChannels(), proc->getExtraOutChannels());
307 m_sidechainDisabled = m_hasSidechain && (m_sidechainDisabled || proc->getNeedsDisabledSidechain());
308 }
309 }
310 if (latency != getLatencySamples()) {
311 logln("updating latency samples to " << latency);
312 setLatencySamples(latency);
313 }
314 m_supportsDoublePrecision = supportsDouble;
315 auto it = m_processors.rbegin();
316 while (it != m_processors.rend() && (*it)->isSuspended()) {
317 it++;
318 }
319 if (it != m_processors.rend()) {
320 m_tailSecs = (*it)->getTailLengthSeconds();
321 } else {
322 m_tailSecs = 0.0;
323 }
324}
325
326std::shared_ptr<Processor> ProcessorChain::getProcessor(int index) {
327 traceScope();

Callers

nothing calls this directly

Calls 8

getLatencySamplesFunction · 0.85
getExtraInChannelsMethod · 0.80
getExtraOutChannelsMethod · 0.80
getLatencySamplesMethod · 0.45
isSuspendedMethod · 0.45
getTailLengthSecondsMethod · 0.45

Tested by

no test coverage detected