11namespace tracktion {
inline namespace engine
30 void createPlayAudioNodesIfNeeded (
TimePosition startTime);
43 tl::expected<Clip::Array, juce::String> stopRecording (
InputDeviceInstance&,
bool discardRecordings);
44 tl::expected<Clip::Array, juce::String> stopRecording (
TimePosition unloopedEnd,
bool discardRecordings);
63 const bool shouldReallocate;
69 static bool shouldAddAntiDenormalisationNoise (
Engine&);
70 static void setAddAntiDenormalisationNoise (
Engine&,
bool);
87 bool isPlaying()
const;
88 bool isLooping()
const;
89 bool isDragging()
const;
93 TimeRange getLoopTimes()
const;
98 double getSampleRate()
const;
129 TimePosition globalStreamTimeToEditTimeUnlooped (
double)
const;
136 void blockUntilSyncPointChange();
160 int getNumActivelyRecordingDevices()
const;
162 void incrementNumActivelyRecordingDevices();
164 void decrementNumActivelyRecordingDevices();
167 bool isAllocated =
false;
169 struct ProcessPriorityBooster
171 ProcessPriorityBooster (
Engine& engine);
172 ~ProcessPriorityBooster();
183 void releaseDeviceList();
184 void rebuildDeviceList();
195 bool hasSynced =
false;
196 double lastStreamPos = 0;
198 struct ContextSyncroniser;
201 struct NodePlaybackContext;
209 void fillNextNodeBlock (
float*
const* allChannels,
int numChannels,
int numSamples);
225 epc.incrementNumActivelyRecordingDevices();
230 epc.decrementNumActivelyRecordingDevices();
static void enablePooledMemory(bool)
Enables reusing of audio buffers during graph processing which may reduce the memory use at the cost ...
static void setThreadPoolStrategy(int)
void addWaveInputDeviceInstance(InputDevice &)
Note this doesn't check for device enablement.
void postPosition(TimePosition positionToJumpTo, std::optional< TimePosition > whenToJump={})
Posts a transport position change.
void setSpeedCompensation(double plusOrMinus)
This will increase/decrease playback speed by resampling, pitching the output up or down.
bool isPlaybackGraphAllocated() const
Returns true if a playback graph is currently allocated.
int getLatencySamples() const
Returns the overall latency of the currently prepared graph.
static void enableNodeMemorySharing(bool)
Enables reusing of audio buffers during graph processing which may reduce the memory use at the cost ...
void setTempoAdjustment(double plusOrMinusProportion)
This will increase/decrease playback speed by changing the tempo, maintaining pitch where possible.
std::optional< TimePosition > getPendingPositionChange() const
Returns a pending position change if there is one.
static int getThreadPoolStrategy()
std::optional< SyncPoint > getSyncPoint() const
Returns the last reference sample position and the edit time and beat that it corresponded to.
static void enableAudioWorkgroup(bool)
Enables using AudioWorkgroups.
The Tracktion Edit class!
The Engine is the central class for all tracktion sessions.
Monitors the levels of buffers that are passed in, and keeps peak values, overloads,...
Base class for audio or midi output devices, to which a track's output can be sent.
Controls the transport of an Edit's playback.
Converts a monotonically increasing reference range in to a timeline range.
#define JUCE_DECLARE_WEAK_REFERENCEABLE(Class)
Represents a duration in real-life time.
Represents a position in real-life time.
Used to temporarily reduce the process priority if a long operation like a file save is taking place.
Releases and then optionally reallocates the context's device list safely.