iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
IPlugAPP.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.
5
6 See LICENSE.txt for more info.
7
8 ==============================================================================
9*/
10
11#ifndef _IPLUGAPI_
12#define _IPLUGAPI_
13
20#include "IPlugPlatform.h"
21#include "IPlugAPIBase.h"
22#include "IPlugProcessor.h"
23
24BEGIN_IPLUG_NAMESPACE
25
26struct InstanceInfo
27{
28 void* pAppHost;
29};
30
31class IPlugAPPHost;
32
35class IPlugAPP : public IPlugAPIBase
36 , public IPlugProcessor
37{
38public:
39 IPlugAPP(const InstanceInfo& info, const Config& config);
40
41 //IPlugAPIBase
42 void BeginInformHostOfParamChange(int idx) override {};
43 void InformHostOfParamChange(int idx, double normalizedValue) override {};
44 void EndInformHostOfParamChange(int idx) override {};
45 void InformHostOfPresetChange() override {};
46 bool EditorResize(int viewWidth, int viewHeight) override;
47
48 //IEditorDelegate
49 void SendSysexMsgFromUI(const ISysEx& msg) override;
50
51 //IPlugProcessor
52 bool SendMidiMsg(const IMidiMsg& msg) override;
53 bool SendSysEx(const ISysEx& msg) override;
54
55 //IPlugAPP
56 void AppProcess(double** inputs, double** outputs, int nFrames);
57
58private:
59 IPlugAPPHost* mAppHost = nullptr;
60 IPlugQueue<IMidiMsg> mMidiMsgsFromCallback {MIDI_TRANSFER_SIZE};
61 IPlugQueue<SysExData> mSysExMsgsFromCallback {SYSEX_TRANSFER_SIZE};
62
63 friend class IPlugAPPHost;
64};
65
66IPlugAPP* MakePlug(const InstanceInfo& info);
67
68END_IPLUG_NAMESPACE
69
70#endif
Include to get consistently named preprocessor macros for different platforms and logging functionali...
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
Definition: IPlugAPIBase.h:43
A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O.
Definition: IPlugAPP_host.h:82
Standalone application base class for an IPlug plug-in.
Definition: IPlugAPP.h:37
bool SendSysEx(const ISysEx &msg) override
Send a single MIDI System Exclusive (SysEx) message // TODO: info about what thread should this be ca...
Definition: IPlugAPP.cpp:102
bool SendMidiMsg(const IMidiMsg &msg) override
Send a single MIDI message // TODO: info about what thread should this be called on or not called on!
Definition: IPlugAPP.cpp:78
bool EditorResize(int viewWidth, int viewHeight) override
Implementations call into the APIs resize hooks returns a bool to indicate whether the DAW or plugin ...
Definition: IPlugAPP.cpp:40
void InformHostOfParamChange(int idx, double normalizedValue) override
Implemented by the API class, called by the UI via SetParameterValue() with the value of a parameter ...
Definition: IPlugAPP.h:43
void EndInformHostOfParamChange(int idx) override
Implemented by the API class, called by the UI (or by a delegate) at the end of a parameter change ge...
Definition: IPlugAPP.h:44
void InformHostOfPresetChange() override
Implemented by the API class, called by the UI (etc) when the plug-in initiates a program/preset chan...
Definition: IPlugAPP.h:45
void BeginInformHostOfParamChange(int idx) override
Implemented by the API class, called by the UI (or by a delegate) at the beginning of a parameter cha...
Definition: IPlugAPP.h:42
The base class for IPlug Audio Processing.
A lock-free SPSC queue used to transfer data between threads based on MLQueue.h by Randy Jones based ...
Definition: IPlugQueue.h:32
Encapsulates a MIDI message and provides helper functions.
Definition: IPlugMidi.h:31
A struct for dealing with SysEx messages.
Definition: IPlugMidi.h:539