iPlug2 - C++ Audio Plug-in Framework
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 
24 BEGIN_IPLUG_NAMESPACE
25 
26 struct InstanceInfo
27 {
28  void* pAppHost;
29 };
30 
31 class IPlugAPPHost;
32 
35 class IPlugAPP : public IPlugAPIBase
36  , public IPlugProcessor
37 {
38 public:
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 
58 private:
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 
66 IPlugAPP* MakePlug(const InstanceInfo& info);
67 
68 END_IPLUG_NAMESPACE
69 
70 #endif
The base class for IPlug Audio Processing.
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
Definition: IPlugAPIBase.h:42
Encapsulates a MIDI message and provides helper functions.
Definition: IPlugMidi.h:30
Include to get consistently named preprocessor macros for different platforms and logging functionali...
Standalone application base class for an IPlug plug-in.
Definition: IPlugAPP.h:35
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
The base class for IPlug Audio Processing.
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
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
A struct for dealing with SysEx messages.
Definition: IPlugMidi.h:538
A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O.
Definition: IPlugAPP_host.h:81
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
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