tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_TrackOutput.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
18{
19public:
20 //==============================================================================
22 ~TrackOutput() override;
23
24 //==============================================================================
25 void initialise();
26 void flushStateToValueTree();
27
29 void updateOutput();
30
31 //==============================================================================
35 bool outputsToDevice (const juce::String& deviceName, bool compareDefaultDevices) const;
36
39
42
45
47 bool outputsToDestTrack (AudioTrack&) const;
48
50 bool feedsInto (const Track* possibleDestTrack) const;
51
57 OutputDevice* getOutputDevice (bool traceThroughDestTracks) const;
58
59 //==============================================================================
60 void setOutputByName (const juce::String& name);
61 void setOutputToTrack (AudioTrack*);
62 void setOutputToDefaultDevice (bool isMidi);
63
64 static void getPossibleOutputDeviceNames (const juce::Array<AudioTrack*>& tracks,
66 juce::BigInteger& hasAudio,
67 juce::BigInteger& hasMidi);
68
69 static void getPossibleOutputNames (const juce::Array<AudioTrack*>& tracks,
71 juce::BigInteger& hasAudio,
72 juce::BigInteger& hasMidi);
73
74 //==============================================================================
75 bool canPlayAudio() const;
77 bool canPlayMidi() const;
78
81
82 juce::ValueTree state;
83
84private:
85 Track& owner;
87 EditItemID destTrackID;
88
89 void valueTreePropertyChanged (juce::ValueTree&, const juce::Identifier&) override;
90 void valueTreeChildAdded (juce::ValueTree&, juce::ValueTree&) override {}
91 void valueTreeChildRemoved (juce::ValueTree&, juce::ValueTree&, int) override {}
92 void valueTreeChildOrderChanged (juce::ValueTree&, int, int) override {}
93 void valueTreeParentChanged (juce::ValueTree&) override {}
94
96};
97
98}} // namespace tracktion { inline namespace engine
Base class for audio or midi output devices, to which a track's output can be sent.
Represents the destination output device(s) for a track.
bool outputsToDevice(const juce::String &deviceName, bool compareDefaultDevices) const
if compareDefaultDevices is true, then this returns true if the device name is 'default ....
void updateOutput()
called as a sanity-check after edit has created all the tracks
AudioTrack * getDestinationTrack() const
if the track's being routed into another one, this returns it
OutputDevice * getOutputDevice(bool traceThroughDestTracks) const
finds the output device.
juce::String getOutputName() const
description of where it's going.
juce::String getDescriptiveOutputName() const
includes the dest track's name, if relevant
bool outputsToDestTrack(AudioTrack &) const
True if this track's direct destination is the one given.
bool injectLiveMidiMessage(const juce::MidiMessage &)
false if not possible
bool feedsInto(const Track *possibleDestTrack) const
true if any downstream tracks match this one
bool canPlayMidi() const
(also true for virtual devices with midi synths)
Base class for tracks which contain clips and plugins and can be added to Edit[s].
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
ID for objects of type EditElement - e.g.