21#include <unordered_map>
23#include <CoreAudio/CoreAudioTypes.h>
26#include "assocarray.h"
47 IPlugAUv3(
const InstanceInfo& info,
const Config& config);
61 void ProcessWithEvents(AudioTimeStamp
const* timestamp, uint32_t frameCount, AURenderEvent
const* events,
ITimeInfo& timeInfo);
62 void SetParameterFromValueObserver(uint64_t address,
float value);
63 void SendParameterValueFromObserver(uint64_t address,
float value);
64 float GetParameter(uint64_t address);
65 const char* GetParamDisplay(uint64_t address,
float value);
66 float GetParamStringToValue(uint64_t address,
const char* str);
67 void AttachInputBuffers(AudioBufferList* pInBufferList);
68 void AttachOutputBuffers(AudioBufferList* pOutBufferList, uint32_t busNumber);
69 void Prepare(
double sampleRate, uint32_t blockSize);
70 void AddParamAddress(
int paramIdx, uint64_t paramAddress)
72 mParamAddressMap.insert({paramIdx, paramAddress});
73 mAddressParamMap.insert({paramAddress, paramIdx});
76 uint64_t GetParamAddress(
int paramIdx) {
return mParamAddressMap[paramIdx]; }
77 int GetParamIdx(uint64_t paramAddress) {
return mAddressParamMap[paramAddress]; }
79 void SetAUAudioUnit(
void* pAUAudioUnit);
81 void SetOffline(
bool renderingOffline) { IPlugProcessor::SetRenderingOffline(renderingOffline); }
86 std::unordered_map<int, uint64_t> mParamAddressMap;
87 std::unordered_map<uint64_t, int> mAddressParamMap;
88 void* mAUAudioUnit =
nullptr;
89 AudioTimeStamp mLastTimeStamp;
92IPlugAUv3* MakePlug(
const InstanceInfo& info);
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
AudioUnit v3 API base class for an IPlug plug-in.
void InformHostOfParamChange(int idx, double normalizedValue) override
Implemented by the API class, called by the UI via SetParameterValue() with the value of a parameter ...
bool SendSysEx(const ISysEx &msg) override
Send a single MIDI System Exclusive (SysEx) message // TODO: info about what thread should this be ca...
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!
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...
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...
void InformHostOfPresetChange() override
Implemented by the API class, called by the UI (etc) when the plug-in initiates a program/preset chan...
The base class for IPlug Audio Processing.
Encapsulates information about the host transport state.
Encapsulates a MIDI message and provides helper functions.
A struct for dealing with SysEx messages.