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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_HostedAudioDevice.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
14class HostedAudioDeviceType;
15
26{
27public:
29
30 //==============================================================================
33 {
35 double sampleRate = 44100.0;
36
38 int blockSize = 512;
39
43 bool useMidiDevices = false;
44
47
50
53 };
54
55 void initialise (const Parameters&);
56
57 // Call each time the sample rate or block size changes
58 void prepareToPlay (double sampleRate, int blockSize);
59
60 // Pass audio and midi buffers to the engine
61 void processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer&);
62
64 static bool isHostedMidiInputDevice (const MidiInputDevice&);
65
66private:
67 friend DeviceManager;
68 friend class HostedAudioDevice;
69 friend class HostedAudioDeviceType;
70 friend class HostedMidiInputDevice;
71 friend class HostedMidiOutputDevice;
72
73 juce::StringArray getInputChannelNames();
74 juce::StringArray getOutputChannelNames();
75
76 MidiOutputDevice* createMidiOutput();
77 MidiInputDevice* createMidiInput();
78
79 Engine& engine;
80 Parameters parameters;
81 HostedAudioDeviceType* deviceType = nullptr;
82
85
86 int maxChannels = 0;
87
89};
90
91}} // namespace tracktion { inline namespace engine
The Engine is the central class for all tracktion sessions.
The HostedAudioDeviceInterface allows an application or plugin to pass audio and midi buffers to the ...
static bool isHostedMidiInputDevice(const MidiInputDevice &)
Returns true if the MidiInput device is a HostedMidiInputDevice.
bool useMidiDevices
If true, the system midi devices will be avaliable to the engine, if false, just a single midi input ...
juce::StringArray inputNames
Names of your audio channels.
Holds the parameters being used by an HostedAudioDeviceInterface.
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)