MCPcopy Create free account
hub / github.com/LabSound/LabSound / process

Method process

src/core/StereoPannerNode.cpp:272–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void StereoPannerNode::process(ContextRenderLock & r, int bufferSize)
273{
274 AudioBus * outputBus = output(0)->bus(r);
275
276 if (!isInitialized() || !input(0)->isConnected() || !m_stereoPanner.get())
277 {
278 outputBus->zero();
279 return;
280 }
281
282 AudioBus * inputBus = input(0)->bus(r);
283
284 if (!inputBus)
285 {
286 inputBus->zero();
287 return;
288 }
289
290 if (m_pan->hasSampleAccurateValues())
291 {
292 // Apply sample-accurate panning specified by AudioParam automation.
293 ASSERT(bufferSize <= m_sampleAccuratePanValues->size());
294
295 if (bufferSize <= m_sampleAccuratePanValues->size())
296 {
297 float * panValues = m_sampleAccuratePanValues->data();
298 m_pan->calculateSampleAccurateValues(r, panValues, bufferSize);
299 m_stereoPanner->panWithSampleAccurateValues(inputBus, outputBus, panValues, bufferSize);
300 }
301 }
302 else
303 {
304 m_stereoPanner->panToTargetValue(inputBus, outputBus, m_pan->value(), bufferSize);
305 }
306
307 outputBus->clearSilentFlag();
308}
309
310void StereoPannerNode::reset(ContextRenderLock &)
311{

Callers

nothing calls this directly

Calls 12

getMethod · 0.80
sizeMethod · 0.80
panToTargetValueMethod · 0.80
busMethod · 0.45
isConnectedMethod · 0.45
zeroMethod · 0.45
dataMethod · 0.45
valueMethod · 0.45
clearSilentFlagMethod · 0.45

Tested by

no test coverage detected