MCPcopy Create free account
hub / github.com/audacity/audacity / ProcessTrack

Method ProcessTrack

libraries/lib-effects/PerTrackEffect.cpp:358–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358bool PerTrackEffect::ProcessTrack(int channel, const Factory &factory,
359 EffectSettings &settings,
360 AudioGraph::Source &upstream, AudioGraph::Sink &sink,
361 std::optional<sampleCount> genLength,
362 const double sampleRate, const SampleTrack &wt,
363 Buffers &inBuffers, Buffers &outBuffers)
364{
365 assert(upstream.AcceptsBuffers(inBuffers));
366 assert(sink.AcceptsBuffers(outBuffers));
367
368 const auto blockSize = inBuffers.BlockSize();
369 assert(upstream.AcceptsBlockSize(blockSize));
370 assert(blockSize == outBuffers.BlockSize());
371
372 auto pSource = EffectStage::Create(
373 channel, static_cast<const WideSampleSequence&>(wt).NChannels(), upstream,
374 inBuffers, factory, settings, sampleRate, genLength);
375 if (!pSource)
376 return false;
377 assert(pSource->AcceptsBlockSize(blockSize)); // post of ctor
378 assert(pSource->AcceptsBuffers(outBuffers));
379
380 AudioGraph::Task task{ *pSource, outBuffers, sink };
381 return task.RunLoop();
382}
383
384std::shared_ptr<EffectOutputTracks> PerTrackEffect::MakeOutputTracks()
385{

Callers

nothing calls this directly

Calls 5

CreateFunction · 0.85
AcceptsBuffersMethod · 0.45
AcceptsBlockSizeMethod · 0.45
NChannelsMethod · 0.45
RunLoopMethod · 0.45

Tested by

no test coverage detected