|
Carla Backend
|
#include <CarlaEngine.hpp>
Classes | |
| struct | PatchbayPosition |
Public Member Functions | |
| virtual | ~CarlaEngine () |
| virtual uint | getMaxClientNameSize () const noexcept |
| virtual uint | getMaxPortNameSize () const noexcept |
| uint | getCurrentPluginCount () const noexcept |
| uint | getMaxPluginNumber () const noexcept |
| virtual bool | init (const char *clientName)=0 |
| virtual bool | close () |
| virtual void | idle () noexcept |
| virtual bool | isRunning () const noexcept=0 |
| virtual bool | isOffline () const noexcept=0 |
| virtual bool | usesConstantBufferSize () const noexcept |
| virtual EngineType | getType () const noexcept=0 |
| virtual const char * | getCurrentDriverName () const noexcept=0 |
| virtual CarlaEngineClient * | addClient (CarlaPluginPtr plugin) |
| virtual float | getDSPLoad () const noexcept |
| virtual uint32_t | getTotalXruns () const noexcept |
| virtual void | clearXruns () const noexcept |
| virtual bool | setBufferSizeAndSampleRate (uint bufferSize, double sampleRate) |
| virtual bool | showDeviceControlPanel () const noexcept |
| bool | addPlugin (BinaryType btype, PluginType ptype, const char *filename, const char *name, const char *label, int64_t uniqueId, const void *extra, uint options=PLUGIN_OPTIONS_NULL) |
| bool | addPlugin (PluginType ptype, const char *filename, const char *name, const char *label, int64_t uniqueId, const void *extra) |
| virtual bool | removePlugin (uint id) |
| bool | removeAllPlugins () |
| virtual bool | renamePlugin (uint id, const char *newName) |
| bool | clonePlugin (uint id) |
| bool | replacePlugin (uint id) noexcept |
| virtual bool | switchPlugins (uint idA, uint idB) noexcept |
| virtual void | touchPluginParameter (uint id, uint32_t parameterId, bool touch) noexcept |
| CarlaPluginPtr | getPlugin (uint id) const noexcept |
| CarlaPluginPtr | getPluginUnchecked (uint id) const noexcept |
| const char * | getUniquePluginName (const char *name) const |
| bool | loadFile (const char *filename) |
| bool | loadProject (const char *filename, bool setAsCurrentProject) |
| bool | saveProject (const char *filename, bool setAsCurrentProject) |
| virtual const char * | getCurrentProjectFolder () const noexcept |
| const char * | getCurrentProjectFilename () const noexcept |
| void | clearCurrentProjectFilename () noexcept |
| uint32_t | getBufferSize () const noexcept |
| double | getSampleRate () const noexcept |
| const char * | getName () const noexcept |
| EngineProcessMode | getProccessMode () const noexcept |
| const EngineOptions & | getOptions () const noexcept |
| virtual EngineTimeInfo | getTimeInfo () const noexcept |
| const float * | getPeaks (uint pluginId) const noexcept |
| float | getInputPeak (uint pluginId, bool isLeft) const noexcept |
| float | getOutputPeak (uint pluginId, bool isLeft) const noexcept |
| virtual void | callback (bool sendHost, bool sendOSC, EngineCallbackOpcode action, uint pluginId, int value1, int value2, int value3, float valuef, const char *valueStr) noexcept |
| void | setCallback (EngineCallbackFunc func, void *ptr) noexcept |
| virtual const char * | runFileCallback (FileCallbackOpcode action, bool isDir, const char *title, const char *filter) noexcept |
| void | setFileCallback (FileCallbackFunc func, void *ptr) noexcept |
| virtual bool | patchbayConnect (bool external, uint groupA, uint portA, uint groupB, uint portB) |
| virtual bool | patchbayDisconnect (bool external, uint connectionId) |
| virtual bool | patchbaySetGroupPos (bool sendHost, bool sendOSC, bool external, uint groupId, int x1, int y1, int x2, int y2) |
| virtual bool | patchbayRefresh (bool sendHost, bool sendOSC, bool external) |
| virtual void | transportPlay () noexcept |
| virtual void | transportPause () noexcept |
| virtual void | transportBPM (double bpm) noexcept |
| virtual void | transportRelocate (uint64_t frame) noexcept |
| const char * | getLastError () const noexcept |
| void | setLastError (const char *error) const noexcept |
| bool | isAboutToClose () const noexcept |
| bool | setAboutToClose () noexcept |
| bool | isLoadingProject () const noexcept |
| void | setActionCanceled (bool canceled) noexcept |
| bool | wasActionCanceled () const noexcept |
| virtual void | setOption (EngineOption option, int value, const char *valueStr) noexcept |
| bool | isOscControlRegistered () const noexcept |
| const char * | getOscServerPathTCP () const noexcept |
| const char * | getOscServerPathUDP () const noexcept |
Static Public Member Functions | |
| static uint | getDriverCount () |
| static const char * | getDriverName (uint index) |
| static const char *const * | getDriverDeviceNames (uint index) |
| static const EngineDriverDeviceInfo * | getDriverDeviceInfo (uint index, const char *driverName) |
| static bool | showDriverDeviceControlPanel (uint index, const char *deviceName) |
| static CarlaEngine * | newDriverByName (const char *driverName) |
Protected Member Functions | |
| CarlaEngine () | |
| void | bufferSizeChanged (uint32_t newBufferSize) |
| void | sampleRateChanged (double newSampleRate) |
| void | offlineModeChanged (bool isOffline) |
| void | setPluginPeaksRT (uint pluginId, float const inPeaks[2], float const outPeaks[2]) noexcept |
| void | saveProjectInternal (water::MemoryOutputStream &outStrm) const |
| bool | loadProjectInternal (water::XmlDocument &xmlDoc, bool alwaysLoadConnections) |
| EngineEvent * | getInternalEventBuffer (bool isInput) const noexcept |
| virtual const char *const * | getPatchbayConnections (bool external) const |
| virtual const PatchbayPosition * | getPatchbayPositions (bool external, uint &count) const |
| virtual void | restorePatchbayConnection (bool external, const char *sourcePort, const char *targetPort) |
| virtual bool | restorePatchbayGroupPosition (bool external, PatchbayPosition &ppos) |
| virtual bool | connectExternalGraphPort (uint, uint, const char *) |
| virtual bool | disconnectExternalGraphPort (uint, uint, const char *) |
Protected Attributes | |
| ProtectedData *const | pData |
Friends | |
| class | CarlaEngineEventPort |
| class | CarlaEngineOsc |
| class | CarlaEngineThread |
| class | CarlaPluginInstance |
| class | EngineInternalGraph |
| class | PendingRtEventsRunner |
| class | ScopedActionLock |
| class | ScopedEngineEnvironmentLocker |
| class | ScopedThreadStopper |
| class | PatchbayGraph |
| struct | ExternalGraph |
| struct | RackGraph |
Carla Engine.
|
protected |
The constructor, protected.
|
virtual |
The destructor. The engine must have been closed before this happens.
|
static |
Get the number of available engine drivers.
|
static |
Get the name of the engine driver at index.
|
static |
Get the device names of the driver at index.
|
static |
Get device information about the driver at index and name driverName.
|
static |
Show a device custom control panel.
|
static |
Create a new engine, using driver driverName. Returned value must be deleted when no longer needed.
|
virtualnoexcept |
Maximum client name size.
|
virtualnoexcept |
Maximum port name size.
|
noexcept |
Current number of plugins loaded.
|
noexcept |
Maximum number of loadable plugins allowed. This function returns 0 if engine is not started.
|
pure virtual |
Initialize/start the engine, using clientName. When the engine is initialized, you need to call idle() at regular intervals.
|
virtual |
Close engine. This function always closes the engine even if it returns false. In other words, even when something goes wrong when closing the engine it still be closed nonetheless.
|
virtualnoexcept |
Idle engine.
|
pure virtualnoexcept |
Check if engine is running.
|
pure virtualnoexcept |
Check if engine is running offline (aka freewheel mode).
|
virtualnoexcept |
Check if engine runs on a constant buffer size value. Default implementation returns true.
|
pure virtualnoexcept |
Get engine type.
|
pure virtualnoexcept |
Get the currently used driver name.
|
virtual |
Add new engine client.
|
virtualnoexcept |
Get the current CPU load estimated by the engine.
|
virtualnoexcept |
Get the total number of xruns so far.
|
virtualnoexcept |
Clear the xrun count.
|
virtual |
Dynamically change buffer size and/or sample rate while engine is running.
|
virtualnoexcept |
Show the custom control panel for the current engine device.
| bool CarlaEngine::addPlugin | ( | BinaryType | btype, |
| PluginType | ptype, | ||
| const char * | filename, | ||
| const char * | name, | ||
| const char * | label, | ||
| int64_t | uniqueId, | ||
| const void * | extra, | ||
| uint | options = PLUGIN_OPTIONS_NULL |
||
| ) |
Add new plugin.
| bool CarlaEngine::addPlugin | ( | PluginType | ptype, |
| const char * | filename, | ||
| const char * | name, | ||
| const char * | label, | ||
| int64_t | uniqueId, | ||
| const void * | extra | ||
| ) |
Add new plugin, using native binary type.
|
virtual |
Remove plugin with id id.
| bool CarlaEngine::removeAllPlugins | ( | ) |
Remove all plugins.
|
virtual |
Rename plugin with id id to newName. Returns the new name, or null if the operation failed. Returned variable must be deleted if non-null.
| bool CarlaEngine::clonePlugin | ( | uint | id | ) |
Clone plugin with id id.
|
noexcept |
Prepare replace of plugin with id id. The next call to addPlugin() will use this id, replacing the selected plugin.
|
virtualnoexcept |
Switch plugins with id idA and idB.
|
virtualnoexcept |
Set a plugin's parameter in drag/touch mode. Usually happens from a UI when the user is moving a parameter with a mouse or similar input.
| parameterId | The parameter to update |
| touch | The new state for the parameter |
|
noexcept |
Get plugin with id id.
|
noexcept |
Get plugin with id id, faster unchecked version.
| const char* CarlaEngine::getUniquePluginName | ( | const char * | name | ) | const |
Get a unique plugin name within the engine. Returned variable must be deleted if non-null.
| bool CarlaEngine::loadFile | ( | const char * | filename | ) |
Load a file of any type. This will try to load a generic file as a plugin, either by direct handling (SF2 and SFZ) or by using an internal plugin (like Audio and MIDI).
| bool CarlaEngine::loadProject | ( | const char * | filename, |
| bool | setAsCurrentProject | ||
| ) |
Load a project file.
| bool CarlaEngine::saveProject | ( | const char * | filename, |
| bool | setAsCurrentProject | ||
| ) |
Save current project to a file.
|
virtualnoexcept |
Get the currently set project folder.
|
noexcept |
Get the currently set project filename.
|
noexcept |
Clear the currently set project filename.
|
noexcept |
Get the current buffer size.
|
noexcept |
Get the current sample rate.
|
noexcept |
Get the current engine name.
|
noexcept |
Get the current engine process mode.
|
noexcept |
Get the current engine options (read-only).
|
virtualnoexcept |
Get the current Time information (read-only).
|
noexcept |
Get a plugin's peak values.
|
noexcept |
Get a plugin's input peak value.
|
noexcept |
Get a plugin's output peak value.
|
virtualnoexcept |
Call the main engine callback, if set. May be called by plugins.
|
noexcept |
Set the main engine callback to func.
|
virtualnoexcept |
Call the file callback, if set. May be called by plugins.
|
noexcept |
Set the file callback to func.
|
virtual |
Connect two patchbay ports.
|
virtual |
Remove a patchbay connection.
|
virtual |
Set the position of a group.
|
virtual |
Force the engine to resend all patchbay clients, ports and connections again.
|
virtualnoexcept |
Start playback of the engine transport.
|
virtualnoexcept |
Pause the engine transport.
|
virtualnoexcept |
Set the engine transport bpm to bpm.
|
virtualnoexcept |
Relocate the engine transport to frames.
|
noexcept |
Get last error.
|
noexcept |
Set last error.
|
noexcept |
Check if the engine is about to close.
|
noexcept |
Tell the engine it's about to close. This is used to prevent the engine thread(s) from reactivating. Returns true if there's no pending engine events.
|
noexcept |
TODO.
|
noexcept |
Tell the engine to stop the current cancelable action.
|
noexcept |
Check wherever the last cancelable action was indeed canceled or not.
|
virtualnoexcept |
Set the engine option option to value or valueStr.
|
noexcept |
Check if OSC controller is registered.
|
noexcept |
Get OSC TCP server path.
|
noexcept |
Get OSC UDP server path.
|
protected |
Report to all plugins about buffer size change.
|
protected |
Report to all plugins about sample rate change. This is not supported on all plugin types, in which case they will have to be re-initiated.
|
protected |
Report to all plugins about offline mode change.
|
protectednoexcept |
Set a plugin (stereo) peak values.
|
protected |
Common save project function for main engine and plugin.
|
protected |
Common load project function for main engine and plugin.
|
protectednoexcept |
Return internal data, needed for EventPorts when used in Rack, Patchbay and Bridge modes.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Virtual functions for handling external graph ports.
|
protectedvirtual |
|
friend |
Some internal classes read directly from pData or call protected functions.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
1.8.17