| 356 | } |
| 357 | |
| 358 | bool 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 | |
| 384 | std::shared_ptr<EffectOutputTracks> PerTrackEffect::MakeOutputTracks() |
| 385 | { |
nothing calls this directly
no test coverage detected