13namespace tracktion {
inline namespace engine
22 : numChannels (numChannelsToUse)
27 audio = numChannels > 0 ? newBuffers.audio.getFirstChannels (numChannels)
29 tracktion::graph::sanityCheckView (audio);
30 midi.copyFrom (newBuffers.midi);
35 tracktion::graph::sanityCheckView (audio);
36 return { audio, midi };
53 choc::buffer::ChannelCount numChannels = 0;
54 choc::buffer::ChannelArrayView<float> audio;
67template<
typename NodePlayerType>
74 nodePlayer.setNode (std::move (nodeToProcess));
79 double sampleRateToUse,
int blockSizeToUse)
81 nodePlayer.setNode (std::move (nodeToProcess), sampleRateToUse, blockSizeToUse);
89 nodePlayer.prepareToPlay (sampleRate, blockSize);
92 int getLatencySamples()
94 return nodePlayer.getNode()->getNodeProperties().latencyNumSamples;
102 return process (pc, {},
true,
false,
false);
109 TimeRange editTime,
bool isPlaying,
bool isScrubbing,
bool isRendering)
115 editTime, isPlaying, isScrubbing, isRendering,
true);
117 return nodePlayer.process (pc);
121 NodePlayerType nodePlayer;
127namespace RackNodeBuilder
131 double sampleRate,
int blockSize,
Simple processor for a Node which uses an InputProvider to pass input in to the graph.
void prepareToPlay(double sampleRate, int blockSize)
Preapres the processor to be played.
RackNodePlayer(std::unique_ptr< tracktion::graph::Node > nodeToProcess, double sampleRateToUse, int blockSizeToUse)
Creates an RackNodePlayer to process an Node with input, sample rate and block size.
int process(const tracktion::graph::Node::ProcessContext &pc, TimeRange editTime, bool isPlaying, bool isScrubbing, bool isRendering)
Processes a block of audio and MIDI data with a given PlayHead and EditTimeRange.
int process(const tracktion::graph::Node::ProcessContext &pc)
Processes a block of audio and MIDI data.
RackNodePlayer(std::unique_ptr< tracktion::graph::Node > nodeToProcess)
Creates an RackNodePlayer to process an Node with input.
Contains the buffers for a processing operation.
Struct to describe a single iteration of a process call.
The context passed to plugin render methods to provide it with buffers to fill.
Holds the state of a process call.