|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Rendering target info. More...
#include "tracktion_AudioNode.h"
Public Types | |
| enum | ContinuityFlags { contiguous , playheadJumped , lastBlockBeforeLoop , firstBlockOfLoop } |
| Values used in the AudioRenderContext::continuity variable. More... | |
Public Member Functions | |
| AudioRenderContext (PlayHead &ph, legacy::EditTimeRange stream, juce::AudioBuffer< float > *buffer, const juce::AudioChannelSet &bufferChannels, int bufferStart, int bufferSize, MidiMessageArray *midiBuffer, double midiOffset, int continuityFlags, bool rendering) noexcept | |
| AudioRenderContext (const AudioRenderContext &)=default | |
| AudioRenderContext (AudioRenderContext &&)=default | |
| AudioRenderContext & | operator= (const AudioRenderContext &)=delete |
| AudioRenderContext & | operator= (AudioRenderContext &&)=delete |
| bool | isContiguousWithPreviousBlock () const noexcept |
| bool | isFirstBlockOfLoop () const noexcept |
| bool | isLastBlockOfLoop () const noexcept |
| bool | didPlayheadJump () const noexcept |
| PlayHead::EditTimeWindow | getEditTime () const |
| Returns the section of the edit that needs to be rendered by this block. | |
| void | clearAudioBuffer () const noexcept |
| Clears the active section of all channels in the audio buffer. | |
| void | clearMidiBuffer () const noexcept |
| Clears the active section of the MIDI buffer. | |
| void | clearAll () const noexcept |
| Clears the active section of all channels in the audio and MIDI buffers. | |
| void | addAntiDenormalisationNoise () const noexcept |
| Applies low-level noise to the audio buffer. | |
| void | sanityCheck () const |
| Does a quick check on the bounds of various values in the structure. | |
Public Attributes | |
| PlayHead & | playhead |
| The playhead provides information about current time, tempo etc at the block being rendered. | |
| legacy::EditTimeRange | streamTime |
| The time window which needs to be rendered into the current block. | |
| juce::AudioBuffer< float > * | destBuffer |
| The target audio buffer which needs to be filled. | |
| juce::AudioChannelSet | destBufferChannels |
| A description of the type of channels in each of the channels in destBuffer. | |
| int | bufferStartSample |
| The index of the start point in the audio buffer from which data must be written. | |
| int | bufferNumSamples |
| The number of samples to write into the audio buffer. | |
| MidiMessageArray * | bufferForMidiMessages |
| A buffer of MIDI events to process. | |
| double | midiBufferOffset |
| A time offset to add to the timestamp of any events in the MIDI buffer. | |
| int | continuity |
| A set of flags to indicate what the relationship is between this block and the previous one. | |
| bool | isRendering |
| True if the rendering is happening as part of an offline render rather than live playback. | |
Rendering target info.
If addValuesToExistingBufferContents is true, the method must add its data to the buffer's contents, otherwise it must overwrite it, as the buffers' contents will be undefined.
Any midi messages added to the midi buffer must have timestamps relative to the start of this block + the midiBufferOffset value.
Either the audio or midi buffers passed in may be null if that kind of data isn't required by the caller.
Definition at line 70 of file tracktion_AudioNode.h.
Values used in the AudioRenderContext::continuity variable.
Definition at line 127 of file tracktion_AudioNode.h.
|
noexcept |
Definition at line 73 of file tracktion_AudioNode.h.
|
noexcept |
Applies low-level noise to the audio buffer.
Definition at line 74 of file tracktion_AudioNode.cpp.
|
noexcept |
Clears the active section of all channels in the audio and MIDI buffers.
Definition at line 86 of file tracktion_AudioNode.cpp.
|
noexcept |
Clears the active section of all channels in the audio buffer.
Definition at line 68 of file tracktion_AudioNode.cpp.
|
noexcept |
Clears the active section of the MIDI buffer.
Definition at line 80 of file tracktion_AudioNode.cpp.
|
noexcept |
Definition at line 143 of file tracktion_AudioNode.h.
| PlayHead::EditTimeWindow tracktion::engine::AudioRenderContext::getEditTime | ( | ) | const |
Returns the section of the edit that needs to be rendered by this block.
Definition at line 92 of file tracktion_AudioNode.cpp.
|
noexcept |
Definition at line 140 of file tracktion_AudioNode.h.
|
noexcept |
Definition at line 141 of file tracktion_AudioNode.h.
|
noexcept |
Definition at line 142 of file tracktion_AudioNode.h.
| void tracktion::engine::AudioRenderContext::sanityCheck | ( | ) | const |
Does a quick check on the bounds of various values in the structure.
Definition at line 162 of file tracktion_AudioNode.h.
| MidiMessageArray* tracktion::engine::AudioRenderContext::bufferForMidiMessages |
A buffer of MIDI events to process.
This may be nullptr if no MIDI is being sent
Definition at line 121 of file tracktion_AudioNode.h.
| int tracktion::engine::AudioRenderContext::bufferNumSamples |
The number of samples to write into the audio buffer.
Definition at line 116 of file tracktion_AudioNode.h.
| int tracktion::engine::AudioRenderContext::bufferStartSample |
The index of the start point in the audio buffer from which data must be written.
Definition at line 113 of file tracktion_AudioNode.h.
| int tracktion::engine::AudioRenderContext::continuity |
A set of flags to indicate what the relationship is between this block and the previous one.
Definition at line 138 of file tracktion_AudioNode.h.
| juce::AudioBuffer<float>* tracktion::engine::AudioRenderContext::destBuffer |
The target audio buffer which needs to be filled.
This may be nullptr if no audio is being processed.
Definition at line 107 of file tracktion_AudioNode.h.
| juce::AudioChannelSet tracktion::engine::AudioRenderContext::destBufferChannels |
A description of the type of channels in each of the channels in destBuffer.
Definition at line 110 of file tracktion_AudioNode.h.
| bool tracktion::engine::AudioRenderContext::isRendering |
True if the rendering is happening as part of an offline render rather than live playback.
Definition at line 146 of file tracktion_AudioNode.h.
| double tracktion::engine::AudioRenderContext::midiBufferOffset |
A time offset to add to the timestamp of any events in the MIDI buffer.
Definition at line 124 of file tracktion_AudioNode.h.
| PlayHead& tracktion::engine::AudioRenderContext::playhead |
The playhead provides information about current time, tempo etc at the block being rendered.
Definition at line 95 of file tracktion_AudioNode.h.
| legacy::EditTimeRange tracktion::engine::AudioRenderContext::streamTime |
The time window which needs to be rendered into the current block.
This is a monotonically increasing window, even if playback is paused. To find out what section of the edit needs to be rendered, Playhead provides conversion methods such as Playhead::streamTimeToEditWindow() or getEditTime()
Definition at line 102 of file tracktion_AudioNode.h.