Browse Source

Update dpf and plugins

Signed-off-by: falkTX <falktx@falktx.com>
main
falkTX 4 months ago
parent
commit
72982ed9cc
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
17 changed files with 261 additions and 199 deletions
  1. +1
    -1
      dpf/README.md
  2. +1
    -3
      dpf/cmake/DPF-plugin.cmake
  3. +6
    -0
      dpf/distrho/DistrhoInfo.hpp
  4. +5
    -74
      dpf/distrho/extra/Base64.hpp
  5. +3
    -3
      dpf/distrho/extra/ValueSmoother.hpp
  6. +1
    -1
      dpf/distrho/extra/WebViewImpl.cpp
  7. +96
    -32
      dpf/distrho/src/DistrhoPluginAU.cpp
  8. +22
    -6
      dpf/distrho/src/DistrhoPluginCLAP.cpp
  9. +11
    -0
      dpf/distrho/src/DistrhoPluginChecks.h
  10. +1
    -2
      dpf/distrho/src/DistrhoPluginVST.hpp
  11. +3
    -3
      dpf/distrho/src/DistrhoPluginVST3.cpp
  12. +6
    -2
      dpf/distrho/src/DistrhoUI.cpp
  13. +3
    -0
      dpf/distrho/src/DistrhoUIAU.mm
  14. +2
    -2
      dpf/distrho/src/DistrhoUIInternal.hpp
  15. +1
    -1
      dpf/distrho/src/DistrhoUIVST3.cpp
  16. +48
    -31
      dpf/distrho/src/jackbridge/JackBridge.cpp
  17. +51
    -38
      dpf/distrho/src/xaymar-vst2/vst.h

+ 1
- 1
dpf/README.md View File

@@ -31,7 +31,7 @@ Bug reports happen on the [DPF github project](https://github.com/DISTRHO/DPF/is

Online documentation is available at [https://distrho.github.io/DPF/](https://distrho.github.io/DPF/).

Online help and discussion about DPF happens in the [kx.studio chat, DPF room](https://chat.kx.studio/channel/dpf).
Online help and discussion about DPF happens in the [DPF github discussions](https://github.com/DISTRHO/DPF/discussions).


## List of plugins made with DPF:


+ 1
- 3
dpf/cmake/DPF-plugin.cmake View File

@@ -493,10 +493,8 @@ function(dpf__determine_vst3_package_architecture OUTPUT_VARIABLE)
else()
set(vst3_package_arch "i386")
endif()
elseif(vst3_system_arch MATCHES "^(armv[3-8][a-z]*|ppc(64)?(le)?)$")
elseif(vst3_system_arch MATCHES "^(armv[3-9][a-z]*|aarch64|loongarch64|ppc(64)?(le)?)$")
set(vst3_package_arch "${vst3_system_arch}")
elseif(vst3_system_arch MATCHES "^(aarch64)$")
set(vst3_package_arch "aarch64")
else()
message(FATAL_ERROR "We don't know this architecture for VST3: ${vst3_system_arch}.")
endif()


+ 6
- 0
dpf/distrho/DistrhoInfo.hpp View File

@@ -553,6 +553,12 @@ START_NAMESPACE_DISTRHO
*/
#define DISTRHO_PLUGIN_WANT_LATENCY 1

/**
Whether the plugin wants MPE for MIDI input and/or output.
@note Only AU and CLAP formats implement this at the moment
*/
#define DISTRHO_PLUGIN_WANT_MIDI_AS_MPE 0

/**
Whether the plugin wants MIDI input.@n
This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.


+ 5
- 74
dpf/distrho/extra/Base64.hpp View File

@@ -21,7 +21,7 @@

#include <vector>

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html

/*
@@ -48,7 +48,7 @@
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
*/

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------
// Helpers

#ifndef DOXYGEN
@@ -77,82 +77,13 @@ uint8_t findBase64CharIndex(const char c)
static constexpr inline
bool isBase64Char(const char c)
{
switch (c)
{
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '+':
case '/':
return true;
default:
return false;
}
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '+' || c == '/';
}

} // namespace DistrhoBase64Helpers
#endif

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

static inline
std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
@@ -213,6 +144,6 @@ std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
return ret;
}

// -----------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

#endif // DISTRHO_BASE64_HPP_INCLUDED

+ 3
- 3
dpf/distrho/extra/ValueSmoother.hpp View File

@@ -180,20 +180,20 @@ public:
inline float peek() const noexcept
{
const float dy = target - mem;
return mem + std::copysign(std::fmin(std::abs(dy), std::abs(step)), dy);
return mem + std::copysign(std::fmin(std::abs(dy), step), dy);
}

inline float next() noexcept
{
const float y0 = mem;
const float dy = target - y0;
return (mem = y0 + std::copysign(std::fmin(std::abs(dy), std::abs(step)), dy));
return (mem = y0 + std::copysign(std::fmin(std::abs(dy), step), dy));
}

private:
void updateStep() noexcept
{
step = (target - mem) / (tau * sampleRate);
step = std::abs(target - mem) / (tau * sampleRate);
}
};



+ 1
- 1
dpf/distrho/extra/WebViewImpl.cpp View File

@@ -106,7 +106,7 @@

@implementation WEB_VIEW_DELEGATE_CLASS_NAME {
@public
WebViewMessageCallback callback;
DISTRHO_NAMESPACE::WebViewMessageCallback callback;
void* callbackPtr;
bool loaded;
}


+ 96
- 32
dpf/distrho/src/DistrhoPluginAU.cpp View File

@@ -202,7 +202,8 @@ static constexpr const uint32_t kType = d_cconst(STRINGIFY(DISTRHO_PLUGIN_AU_TYP
static constexpr const uint32_t kSubType = d_cconst(STRINGIFY(DISTRHO_PLUGIN_UNIQUE_ID));
static constexpr const uint32_t kManufacturer = d_cconst(STRINGIFY(DISTRHO_PLUGIN_BRAND_ID));

static constexpr const uint32_t kWantedAudioFormat = kAudioFormatFlagsNativeFloatPacked
static constexpr const uint32_t kWantedAudioFormat = 0
| kAudioFormatFlagsNativeFloatPacked
| kAudioFormatFlagIsNonInterleaved;


@@ -276,12 +277,28 @@ struct RenderListener {
typedef std::vector<PropertyListener> PropertyListeners;
typedef std::vector<RenderListener> RenderListeners;

// --------------------------------------------------------------------------------------------------------------------

typedef struct {
UInt32 numPackets;
MIDIPacket packets[kMaxMidiEvents];
} d_MIDIPacketList;
#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
// useful definitions
static constexpr const uint32_t kMIDIPacketNonDataSize = sizeof(MIDIPacket)
#if __cplusplus >= 201103L
- sizeof(MIDIPacket::data);
#else
- sizeof(static_cast<MIDIPacket*>(0)->data);
#endif
static constexpr const uint32_t kMIDIPacketListNonDataSize = sizeof(MIDIPacketList)
#if __cplusplus >= 201103L
- sizeof(MIDIPacketList::packet);
#else
- sizeof(static_cast<MIDIPacketList*>(0)->packet);
#endif

// size of data used for midi events
static constexpr const uint32_t kMIDIPacketListMaxDataSize = kMIDIPacketNonDataSize * kMaxMidiEvents
+ sizeof(Byte) * MidiEvent::kDataSize * kMaxMidiEvents;

// size of midi list + data
static constexpr const uint32_t kMIDIPacketListSize = kMIDIPacketListNonDataSize + kMIDIPacketListMaxDataSize;
#endif

// --------------------------------------------------------------------------------------------------------------------

@@ -335,6 +352,9 @@ public:
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
, fMidiEventCount(0)
#endif
#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
, fMidiOutputDataOffset(0)
#endif
#if DISTRHO_PLUGIN_WANT_PROGRAMS
, fCurrentProgram(-1)
, fLastFactoryProgram(0)
@@ -370,8 +390,10 @@ public:
#endif

#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
if ((fMidiOutputPackets = static_cast<MIDIPacketList*>(std::malloc(kMIDIPacketListSize))) != nullptr)
std::memset(fMidiOutputPackets, 0, kMIDIPacketListSize);

std::memset(&fMidiOutput, 0, sizeof(fMidiOutput));
std::memset(&fMidiOutputPackets, 0, sizeof(fMidiOutputPackets));
#endif

#if DISTRHO_PLUGIN_WANT_PROGRAMS
@@ -428,6 +450,10 @@ public:
reallocAudioBufferList(false);
#endif

#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
std::free(fMidiOutputPackets);
#endif

#if DISTRHO_PLUGIN_WANT_PROGRAMS
for (uint32_t i=0; i<fProgramCount; ++i)
CFRelease(fFactoryPresetsData[i].presetName);
@@ -451,7 +477,8 @@ public:
fMidiEventCount = 0;
#endif
#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
fMidiOutputPackets.numPackets = 0;
fMidiOutputDataOffset = 0;
fMidiOutputPackets->numPackets = 0;
#endif
#if DISTRHO_PLUGIN_WANT_TIMEPOS
fTimePosition.clear();
@@ -635,7 +662,7 @@ public:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
#if DISTRHO_PLUGIN_WANT_TIMEPOS
outDataSize = sizeof(HostCallbackInfo);
outWritable = false;
outWritable = true;
return noErr;
#else
return kAudioUnitErr_InvalidProperty;
@@ -659,6 +686,17 @@ public:
outWritable = true;
return noErr;

case kAudioUnitProperty_SupportsMPE:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inScope == kAudioUnitScope_Global, inScope, kAudioUnitErr_InvalidScope);
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
#if DISTRHO_PLUGIN_WANT_MIDI_AS_MPE
outDataSize = sizeof(UInt32);
outWritable = false;
return noErr;
#else
return kAudioUnitErr_InvalidProperty;
#endif

case kAudioUnitProperty_CocoaUI:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inScope == kAudioUnitScope_Global, inScope, kAudioUnitErr_InvalidScope);
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
@@ -708,7 +746,7 @@ public:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inScope == kAudioUnitScope_Global, inScope, kAudioUnitErr_InvalidScope);
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
outDataSize = sizeof(uint16_t);
outWritable = false;
outWritable = true;
return noErr;

case 'DPFe':
@@ -739,7 +777,7 @@ public:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inScope == kAudioUnitScope_Global, inScope, kAudioUnitErr_InvalidScope);
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
outDataSize = sizeof(uint32_t);
outWritable = false;
outWritable = true;
return noErr;
#endif

@@ -748,7 +786,7 @@ public:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inScope == kAudioUnitScope_Global, inScope, kAudioUnitErr_InvalidScope);
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
outDataSize = sizeof(CFArrayRef);
outWritable = false;
outWritable = true;
return noErr;

case 'DPFs':
@@ -764,7 +802,7 @@ public:
DISTRHO_SAFE_ASSERT_UINT_RETURN(inScope == kAudioUnitScope_Global, inScope, kAudioUnitErr_InvalidScope);
DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement);
outDataSize = sizeof(void*);
outWritable = false;
outWritable = true;
return noErr;
#endif

@@ -1028,6 +1066,12 @@ public:
}
return noErr;

#if DISTRHO_PLUGIN_WANT_MIDI_AS_MPE
case kAudioUnitProperty_SupportsMPE:
*static_cast<UInt32*>(outData) = 1;
return noErr;
#endif

#if DISTRHO_PLUGIN_HAS_UI
case kAudioUnitProperty_CocoaUI:
{
@@ -1787,7 +1831,8 @@ public:
fMidiEventCount = 0;
#endif
#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
fMidiOutputPackets.numPackets = 0;
fMidiOutputDataOffset = 0;
fMidiOutputPackets->numPackets = 0;
#endif
#if DISTRHO_PLUGIN_WANT_TIMEPOS
fTimePosition.clear();
@@ -2015,7 +2060,7 @@ public:
midiEvent.data[1] = inData1;
midiEvent.data[2] = inData2;

switch (inStatus)
switch (inStatus & 0xF0)
{
case 0x80:
case 0x90:
@@ -2057,6 +2102,8 @@ public:
break;
default:
// invalid
d_debug("auMIDIEvent received invalid event %u %u %u %u @ %u",
inStatus, inData1, inData2, inOffsetSampleFrame, fMidiEventCount);
return kAudioUnitErr_InvalidPropertyValue;
}

@@ -2141,8 +2188,9 @@ private:
#endif

#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
uint32_t fMidiOutputDataOffset;
MIDIPacketList* fMidiOutputPackets;
AUMIDIOutputCallbackStruct fMidiOutput;
d_MIDIPacketList fMidiOutputPackets;
#endif

#if DISTRHO_PLUGIN_WANT_PROGRAMS
@@ -2217,7 +2265,8 @@ private:
#endif

#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
fMidiOutputPackets.numPackets = 0;
fMidiOutputDataOffset = 0;
fMidiOutputPackets->numPackets = 0;
#endif

#if DISTRHO_PLUGIN_WANT_TIMEPOS
@@ -2294,12 +2343,11 @@ private:
#endif

#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
if (fMidiOutputPackets.numPackets != 0 && fMidiOutput.midiOutputCallback != nullptr)
if (fMidiOutputPackets != nullptr &&
fMidiOutputPackets->numPackets != 0 &&
fMidiOutput.midiOutputCallback != nullptr)
{
fMidiOutput.midiOutputCallback(fMidiOutput.userData,
inTimeStamp,
0,
reinterpret_cast<const ::MIDIPacketList*>(&fMidiOutputPackets));
fMidiOutput.midiOutputCallback(fMidiOutput.userData, inTimeStamp, 0, fMidiOutputPackets);
}
#else
// unused
@@ -2716,17 +2764,21 @@ private:
bool writeMidi(const MidiEvent& midiEvent)
{
DISTRHO_CUSTOM_SAFE_ASSERT_ONCE_RETURN("MIDI output unsupported", fMidiOutput.midiOutputCallback != nullptr, false);
DISTRHO_CUSTOM_SAFE_ASSERT_ONCE_RETURN("Out of memory", fMidiOutputPackets != nullptr, false);

if (midiEvent.size > sizeof(MIDIPacket::data))
return true;
if (fMidiOutputPackets.numPackets == kMaxMidiEvents)
if (fMidiOutputDataOffset + kMIDIPacketNonDataSize + midiEvent.size >= kMIDIPacketListMaxDataSize)
return false;

const uint8_t* const midiData = midiEvent.size > MidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data;
MIDIPacket& packet(fMidiOutputPackets.packets[fMidiOutputPackets.numPackets++]);
packet.timeStamp = midiEvent.frame;
packet.length = midiEvent.size;
std::memcpy(packet.data, midiData, midiEvent.size);
MIDIPacket* const packet = reinterpret_cast<MIDIPacket*>(
reinterpret_cast<uint8_t*>(fMidiOutputPackets->packet) + fMidiOutputDataOffset);

packet->timeStamp = midiEvent.frame;
packet->length = midiEvent.size;
std::memcpy(packet->data, midiData, midiEvent.size);

++fMidiOutputPackets->numPackets;
fMidiOutputDataOffset += kMIDIPacketNonDataSize + midiEvent.size;
return true;
}

@@ -2814,12 +2866,16 @@ struct AudioComponentPlugInInstance {

static OSStatus Open(void* const self, const AudioUnit component)
{
d_debug("AudioComponentPlugInInstance::Open(%p)", self);

static_cast<AudioComponentPlugInInstance*>(self)->plugin = new PluginAU(component);
return noErr;
}

static OSStatus Close(void* const self)
{
d_debug("AudioComponentPlugInInstance::Close(%p)", self);

delete static_cast<AudioComponentPlugInInstance*>(self);
return noErr;
}
@@ -2928,8 +2984,16 @@ struct AudioComponentPlugInInstance {
void* const outData,
UInt32* const ioDataSize)
{
d_debug("AudioComponentPlugInInstance::GetProperty(%p, %d:%x:%s, %d:%s, %d, ...)",
self, inProp, inProp, AudioUnitPropertyID2Str(inProp), inScope, AudioUnitScope2Str(inScope), inElement);
#ifdef DEBUG
switch (inProp) {
case kAudioUnitProperty_PresentPreset:
break;
default:
d_debug("AudioComponentPlugInInstance::GetProperty(%p, %d:%x:%s, %d:%s, %d, ...)",
self, inProp, inProp, AudioUnitPropertyID2Str(inProp), inScope, AudioUnitScope2Str(inScope), inElement);
break;
}
#endif
DISTRHO_SAFE_ASSERT_RETURN(ioDataSize != nullptr, kAudio_ParamError);

Boolean writable;


+ 22
- 6
dpf/distrho/src/DistrhoPluginCLAP.cpp View File

@@ -821,6 +821,11 @@ public:
#endif
}

void reset()
{
fHost->request_restart(fHost);
}

bool process(const clap_process_t* const process)
{
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
@@ -2284,23 +2289,33 @@ static bool CLAP_ABI clap_plugin_note_ports_get(const clap_plugin_t*, uint32_t,
{
if (is_input)
{
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
info->id = 0;
#if DISTRHO_PLUGIN_WANT_MIDI_AS_MPE
info->supported_dialects = CLAP_NOTE_DIALECT_MIDI | CLAP_NOTE_DIALECT_MIDI_MPE;
info->preferred_dialect = CLAP_NOTE_DIALECT_MIDI_MPE;
#else
info->supported_dialects = CLAP_NOTE_DIALECT_MIDI;
info->preferred_dialect = CLAP_NOTE_DIALECT_MIDI;
#endif
std::strcpy(info->name, "Event/MIDI Input");
return true;
#endif
#endif
}
else
{
#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
#if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
info->id = 0;
#if DISTRHO_PLUGIN_WANT_MIDI_AS_MPE
info->supported_dialects = CLAP_NOTE_DIALECT_MIDI | CLAP_NOTE_DIALECT_MIDI_MPE;
info->preferred_dialect = CLAP_NOTE_DIALECT_MIDI_MPE;
#else
info->supported_dialects = CLAP_NOTE_DIALECT_MIDI;
info->preferred_dialect = CLAP_NOTE_DIALECT_MIDI;
#endif
std::strcpy(info->name, "Event/MIDI Output");
return true;
#endif
#endif
}

return false;
@@ -2440,9 +2455,10 @@ static void CLAP_ABI clap_plugin_stop_processing(const clap_plugin_t*)
// nothing to do
}

static void CLAP_ABI clap_plugin_reset(const clap_plugin_t*)
static void CLAP_ABI clap_plugin_reset(const clap_plugin_t* const plugin)
{
// nothing to do
PluginCLAP* const instance = static_cast<PluginCLAP*>(plugin->plugin_data);
instance->reset();
}

static clap_process_status CLAP_ABI clap_plugin_process(const clap_plugin_t* const plugin, const clap_process_t* const process)


+ 11
- 0
dpf/distrho/src/DistrhoPluginChecks.h View File

@@ -65,6 +65,10 @@
# define DISTRHO_PLUGIN_WANT_LATENCY 0
#endif

#ifndef DISTRHO_PLUGIN_WANT_MIDI_AS_MPE
# define DISTRHO_PLUGIN_WANT_MIDI_AS_MPE 0
#endif

#ifndef DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
# define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 0
#endif
@@ -178,6 +182,13 @@
# error Synths need audio output to work!
#endif

// --------------------------------------------------------------------------------------------------------------------
// Test if MIDI as MPE enabled where it doesn't make sense

#if DISTRHO_PLUGIN_WANT_MIDI_AS_MPE && ! (DISTRHO_PLUGIN_WANT_MIDI_INPUT || DISTRHO_PLUGIN_WANT_MIDI_OUTPUT)
# error MIDI as MPE needs MIDI input or output to work!
#endif

// --------------------------------------------------------------------------------------------------------------------
// Enable MIDI input if synth, test if midi-input disabled when synth



+ 1
- 2
dpf/distrho/src/DistrhoPluginVST.hpp View File

@@ -70,8 +70,7 @@ enum Vst3InternalParameters {
kVst3InternalParameterBaseCount,
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
kVst3InternalParameterMidiCC_start = kVst3InternalParameterBaseCount,
kVst3InternalParameterMidiCC_end = kVst3InternalParameterMidiCC_start + 130*16,
kVst3InternalParameterCount
kVst3InternalParameterCount = kVst3InternalParameterMidiCC_start + 130 * 16
#else
kVst3InternalParameterCount = kVst3InternalParameterBaseCount
#endif


+ 3
- 3
dpf/distrho/src/DistrhoPluginVST3.cpp View File

@@ -1573,7 +1573,7 @@ public:
{
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
// if there are any MIDI CC events as parameter changes, handle them here
if (canAppendMoreEvents && rindex >= kVst3InternalParameterMidiCC_start && rindex <= kVst3InternalParameterMidiCC_end)
if (canAppendMoreEvents && rindex >= kVst3InternalParameterMidiCC_start && rindex < kVst3InternalParameterCount)
{
for (int32_t j = 0, pcount = v3_cpp_obj(queue)->get_point_count(queue); j < pcount; ++j)
{
@@ -2008,7 +2008,7 @@ public:
#if !DPF_VST3_PURE_MIDI_INTERNAL_PARAMETERS
rindex >= kVst3InternalParameterMidiCC_start &&
#endif
rindex <= kVst3InternalParameterMidiCC_end)
rindex < kVst3InternalParameterCount)
return 0.0;
#endif

@@ -2045,7 +2045,7 @@ public:
#if !DPF_VST3_PURE_MIDI_INTERNAL_PARAMETERS
rindex >= kVst3InternalParameterMidiCC_start &&
#endif
rindex <= kVst3InternalParameterMidiCC_end)
rindex < kVst3InternalParameterCount)
return V3_INVALID_ARG;
#endif



+ 6
- 2
dpf/distrho/src/DistrhoUI.cpp View File

@@ -26,7 +26,9 @@
# include <stdint.h>
#endif

#if defined(DISTRHO_OS_WINDOWS)
#if defined(DISTRHO_OS_WASM)
# include <emscripten/emscripten.h>
#elif defined(DISTRHO_OS_WINDOWS)
# include <winsock2.h>
# include <windows.h>
#elif defined(HAVE_X11)
@@ -94,7 +96,9 @@ static double getDesktopScaleFactor(const uintptr_t parentWindowHandle)
if (const char* const scale = getenv("DPF_SCALE_FACTOR"))
return std::max(1.0, std::atof(scale));

#if defined(DISTRHO_OS_WINDOWS)
#if defined(DISTRHO_OS_WASM)
return emscripten_get_device_pixel_ratio();
#elif defined(DISTRHO_OS_WINDOWS)
if (const HMODULE Shcore = LoadLibraryA("Shcore.dll"))
{
typedef HRESULT(WINAPI* PFN_GetProcessDpiAwareness)(HANDLE, DWORD*);


+ 3
- 0
dpf/distrho/src/DistrhoUIAU.mm View File

@@ -387,6 +387,9 @@ END_NAMESPACE_DISTRHO
#define COCOA_VIEW_CLASS_NAME \
MACRO_NAME(CocoaView_, DISTRHO_PLUGIN_AU_TYPE, _, DISTRHO_PLUGIN_UNIQUE_ID, _, DISTRHO_PLUGIN_BRAND_ID)

using DISTRHO_NAMESPACE::DPF_UI_AU;
using DISTRHO_NAMESPACE::d_nextSampleRate;

@interface COCOA_VIEW_CLASS_NAME : NSView
{
@public


+ 2
- 2
dpf/distrho/src/DistrhoUIInternal.hpp View File

@@ -267,12 +267,12 @@ public:
uiData->app.repaintIfNeeeded();
}

void addIdleCallbackForNativeIdle(IdleCallback* const cb, const uint timerFrequencyInMs)
void addIdleCallbackForNativeIdle(DGL_NAMESPACE::IdleCallback* const cb, const uint timerFrequencyInMs)
{
uiData->window->addIdleCallback(cb, timerFrequencyInMs);
}

void removeIdleCallbackForNativeIdle(IdleCallback* const cb)
void removeIdleCallbackForNativeIdle(DGL_NAMESPACE::IdleCallback* const cb)
{
uiData->window->removeIdleCallback(cb);
}


+ 1
- 1
dpf/distrho/src/DistrhoUIVST3.cpp View File

@@ -129,7 +129,7 @@ static uint translateVST3Modifiers(const int64_t modifiers) noexcept
* Helper class for getting a native idle timer.
*/
#if !DPF_VST3_USING_HOST_RUN_LOOP
class NativeIdleCallback : public IdleCallback
class NativeIdleCallback : public DGL_NAMESPACE::IdleCallback
{
public:
NativeIdleCallback(UIExporter& ui)


+ 48
- 31
dpf/distrho/src/jackbridge/JackBridge.cpp View File

@@ -1,6 +1,6 @@
/*
* JackBridge for DPF
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2024 Filipe Coelho <falktx@falktx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
@@ -60,10 +60,15 @@ typedef void* lib_t;
# undef HAVE_SDL2
#endif

#if defined(HAVE_RTAUDIO) && DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0
#if defined(HAVE_RTAUDIO) && (DISTRHO_PLUGIN_NUM_INPUTS + DISTRHO_PLUGIN_NUM_OUTPUTS) > 0
// fix conflict between DGL and macOS names
# define Point CorePoint
# define Size CoreSize
# ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
# endif
# include "RtAudioBridge.hpp"
# ifdef RTAUDIO_API_TYPE
# include "rtaudio/RtAudio.cpp"
@@ -71,15 +76,18 @@ typedef void* lib_t;
# ifdef RTMIDI_API_TYPE
# include "rtmidi/RtMidi.cpp"
# endif
# ifdef __clang__
# pragma clang diagnostic pop
# endif
# undef Point
# undef Size
#endif

#if defined(HAVE_SDL2) && DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0
#if defined(HAVE_SDL2) && (DISTRHO_PLUGIN_NUM_INPUTS + DISTRHO_PLUGIN_NUM_OUTPUTS) > 0
# include "SDL2Bridge.hpp"
#endif

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

extern "C" {

@@ -229,7 +237,7 @@ typedef void (JACKSYM_API *jacksym_set_thread_creator)(jacksym_thread_creator_t)

} // extern "C"

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

struct JackBridge {
lib_t lib;
@@ -632,7 +640,7 @@ static bool usingNativeBridge = false;
static bool usingRealJACK = true;
static NativeBridge* nativeBridge = nullptr;

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

static JackBridge& getBridgeInstance() noexcept
{
@@ -642,7 +650,7 @@ static JackBridge& getBridgeInstance() noexcept

#endif // ! (defined(JACKBRIDGE_DIRECT) || defined(JACKBRIDGE_DUMMY))

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

#if defined(__WINE__) && ! defined(JACKBRIDGE_DIRECT)

@@ -861,7 +869,7 @@ struct WineBridge {

#endif // __WINE__ && ! JACKBRIDGE_DIRECT

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_is_ok() noexcept
{
@@ -882,7 +890,7 @@ void jackbridge_init()
#endif
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

void jackbridge_get_version(int* major_ptr, int* minor_ptr, int* micro_ptr, int* proto_ptr)
{
@@ -915,7 +923,7 @@ const char* jackbridge_get_version_string()
return nullptr;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

jack_client_t* jackbridge_client_open(const char* client_name, uint32_t options, jack_status_t* status)
{
@@ -1006,7 +1014,7 @@ bool jackbridge_client_close(jack_client_t* client)
return false;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

int jackbridge_client_name_size()
{
@@ -1034,7 +1042,7 @@ const char* jackbridge_get_client_name(jack_client_t* client)
return nullptr;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

char* jackbridge_client_get_uuid(jack_client_t* client)
{
@@ -1075,7 +1083,7 @@ char* jackbridge_get_client_name_by_uuid(jack_client_t* client, const char* uuid
return nullptr;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_uuid_parse(const char* buf, jack_uuid_t* uuid)
{
@@ -1102,7 +1110,7 @@ void jackbridge_uuid_unparse(jack_uuid_t uuid, char buf[JACK_UUID_STRING_SIZE])
#endif
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_activate(jack_client_t* client)
{
@@ -1145,7 +1153,7 @@ bool jackbridge_is_realtime(jack_client_t* client)
return false;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_set_thread_init_callback(jack_client_t* client, JackThreadInitCallback thread_init_callback, void* arg)
{
@@ -1423,7 +1431,7 @@ bool jackbridge_set_latency_callback(jack_client_t* client, JackLatencyCallback
return false;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_set_freewheel(jack_client_t* client, bool onoff)
{
@@ -1452,7 +1460,7 @@ bool jackbridge_set_buffer_size(jack_client_t* client, jack_nframes_t nframes)
return false;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

jack_nframes_t jackbridge_get_sample_rate(jack_client_t* client)
{
@@ -1495,7 +1503,7 @@ float jackbridge_cpu_load(jack_client_t* client)
return 0.0f;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

jack_port_t* jackbridge_port_register(jack_client_t* client, const char* port_name, const char* type, uint64_t flags, uint64_t buffer_size)
{
@@ -1540,7 +1548,7 @@ void* jackbridge_port_get_buffer(jack_port_t* port, jack_nframes_t nframes)
return nullptr;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

const char* jackbridge_port_name(const jack_port_t* port)
{
@@ -1672,7 +1680,7 @@ const char** jackbridge_port_get_all_connections(const jack_client_t* client, co
return nullptr;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_port_rename(jack_client_t* client, jack_port_t* port, const char* port_name)
{
@@ -1731,7 +1739,7 @@ int jackbridge_port_get_aliases(const jack_port_t* port, char* const aliases[2])
return 0;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_port_request_monitor(jack_port_t* port, bool onoff)
{
@@ -1785,7 +1793,7 @@ bool jackbridge_port_monitoring_input(jack_port_t* port)
return false;
}

// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_connect(jack_client_t* client, const char* source_port, const char* destination_port)
{
@@ -1828,7 +1836,8 @@ bool jackbridge_port_disconnect(jack_client_t* client, jack_port_t* port)
return false;
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

int jackbridge_port_name_size()
{
@@ -1869,7 +1878,8 @@ uint32_t jackbridge_port_type_get_buffer_size(jack_client_t* client, const char*
return 0;
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

void jackbridge_port_get_latency_range(jack_port_t* port, uint32_t mode, jack_latency_range_t* range)
{
@@ -1914,7 +1924,8 @@ bool jackbridge_recompute_total_latencies(jack_client_t* client)
return false;
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

const char** jackbridge_get_ports(jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, uint64_t flags)
{
@@ -1956,7 +1967,8 @@ jack_port_t* jackbridge_port_by_id(jack_client_t* client, jack_port_id_t port_id
return nullptr;
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

void jackbridge_free(void* ptr)
{
@@ -1973,7 +1985,8 @@ void jackbridge_free(void* ptr)
#endif
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

uint32_t jackbridge_midi_get_event_count(void* port_buffer)
{
@@ -2043,7 +2056,8 @@ jack_midi_data_t* jackbridge_midi_event_reserve(void* port_buffer, jack_nframes_
return nullptr;
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_release_timebase(jack_client_t* client)
{
@@ -2192,7 +2206,8 @@ void jackbridge_transport_stop(jack_client_t* client)
#endif
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

bool jackbridge_set_property(jack_client_t* client, jack_uuid_t subject, const char* key, const char* value, const char* type)
{
@@ -2360,7 +2375,8 @@ void jackbridge_cycle_signal(jack_client_t* client, int status)
#endif
}

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

#ifndef JACKBRIDGE_SKIP_NATIVE_UTILS

@@ -2460,4 +2476,5 @@ END_NAMESPACE_DISTRHO

#endif // JACKBRIDGE_SKIP_NATIVE_UTILS

// -----------------------------------------------------------------------------

// --------------------------------------------------------------------------------------------------------------------

+ 51
- 38
dpf/distrho/src/xaymar-vst2/vst.h View File

@@ -1,9 +1,22 @@
// This was created from released VST2.x plugins, and is technically under the 2-clause BSD license.
// Depending on which country you are in, Steinberg can do fuck all about this. Notable countries for
// this are most members of the United States of America, the entirety of Europe, Japan, and Russia.
// Consult a lawyer if you don't know if clean room reverse engineering is allowed in your country.
/*
* Copyright 2020 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

// See README.md for all information.
/*
* This was created from released VST2.x plugins, and is technically under the 2-clause BSD license. Depending on which country you are in, Steinberg can do fuck all about this. Notable countries for this are most members of the United States of America, the entirety of Europe, Japan, and Russia.
*
* Consult a lawyer if you don't know if clean room reverse engineering is allowed in your country.
*
* See README.md for all information.
*/

// Known additional information:
// - Function call standard seems to be stdcall.
@@ -94,7 +107,7 @@ enum VST_CATEGORY {

enum VST_EFFECT_OPCODE {
/* Create/Initialize the effect (if it has not been created already).
*
*
* @return Always 0.
*/
VST_EFFECT_OPCODE_00 = 0x00,
@@ -104,7 +117,7 @@ enum VST_EFFECT_OPCODE {
/* Destroy the effect (if there is any) and free its memory.
*
* This should destroy the actual object created by VST_ENTRYPOINT.
*
*
* @return Always 0.
*/
VST_EFFECT_OPCODE_01 = 0x01,
@@ -135,7 +148,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_05 = 0x05,

/* Get the value? label for the parameter.
*
*
* @param p_int1 Parameter index.
* @param p_ptr 'char[8]'
* @return 0 on success, 1 on failure.
@@ -144,7 +157,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_PARAM_GETLABEL = 0x06,

/* Get the string value for the parameter.
*
*
* @param p_int1 Parameter index.
* @param p_ptr 'char[8]'
* @return 0 on success, 1 on failure.
@@ -153,7 +166,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_PARAM_GETVALUE = 0x07,

/* Get the name for the parameter.
*
*
* @param p_int1 Parameter index.
* @param p_ptr 'char[8]'
* @return 0 on success, 1 on failure.
@@ -168,7 +181,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_09 = 0x09,

/* Set the new sample rate for the plugin to use.
*
*
* @param p_float New sample rate as a float (double on 64-bit because register upgrades).
*/
VST_EFFECT_OPCODE_0A = 0x0A,
@@ -186,7 +199,7 @@ enum VST_EFFECT_OPCODE {
/* Effect processing should be suspended/paused.
*
* Unclear if this is should result in a flush of buffers.
*
*
* @param p_int2 0 if the effect should suspend processing, 1 if it should resume.
*/
VST_EFFECT_OPCODE_0C = 0x0C,
@@ -202,7 +215,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_WINDOW_GETRECT = 0x0D,

/* Create the window for the plugin.
*
*
* @param p_ptr HWND of the parent window.
* @return 0 on failure, or HWND on success.
*/
@@ -210,7 +223,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_WINDOW_CREATE = 0x0E,

/* Destroy the plugins window.
*
*
* @return Always 0.
*/
VST_EFFECT_OPCODE_0F = 0x0F,
@@ -383,7 +396,7 @@ enum VST_EFFECT_OPCODE {
*/
VST_EFFECT_OPCODE_29 = 0x29,

/* Set the speaker arrangement
/* Set the speaker arrangement
*
* @param p_int2 (vst_speaker_arrangement*) Pointer to a pointer to the speaker arrangement for the input.
* @param p_ptr (vst_speaker_arrangement*) Pointer to a pointer to the speaker arrangement for the output.
@@ -446,13 +459,13 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_VENDOR_VERSION = 0x31,

/* User defined OP Code, for custom interaction.
*
*
*/
VST_EFFECT_OPCODE_32 = 0x32,
VST_EFFECT_OPCODE_CUSTOM = 0x32,

/* Test for support of a specific named feature.
*
*
* @param p_ptr Pointer to a zero-terminated buffer containing the feature name.
* @return Non-zero if the feature is supported, otherwise 0.
*/
@@ -460,7 +473,7 @@ enum VST_EFFECT_OPCODE {
VST_EFFECT_OPCODE_SUPPORTS = 0x33,

/* Number of samples that are at the tail at the end of playback.
*
*
* @return 0 or 1 for no tail, > 1 for number of samples to tail.
*/
VST_EFFECT_OPCODE_34 = 0x34,
@@ -586,14 +599,14 @@ enum VST_EFFECT_OPCODE {

/* Begin processing of audio.
*
*
*
*
*
*/
VST_EFFECT_OPCODE_PROCESS_BEGIN = 0x47,

/* End processing of audio.
*
*
*
*
*/
VST_EFFECT_OPCODE_PROCESS_END = 0x48,
@@ -705,7 +718,7 @@ enum VST_HOST_OPCODE {
VST_HOST_OPCODE_2B = 0x2B,

/* Parameter lost focus.
*
*
* @param int1 Parameter index.
*/
VST_HOST_OPCODE_2C = 0x2C,
@@ -808,7 +821,7 @@ struct vst_effect {
// 64-bit adds 4-byte padding here to align pointers.

/* Control the VST through an opcode and up to four parameters.
*
*
* @param this Pointer to the effect itself.
* @param opcode The opcode to run, see VST_EFFECT_OPCODES.
* @param p_int1 Parameter, see VST_EFFECT_OPCODES.
@@ -817,22 +830,22 @@ struct vst_effect {
* @param p_float Parameter, see VST_EFFECT_OPCODES.
*/
intptr_t(VST_FUNCTION_INTERFACE* control)(vst_effect* pthis, VST_EFFECT_OPCODE opcode, int32_t p_int1,
intptr_t p_int2, void* p_ptr, float p_float);
intptr_t p_int2, void* p_ptr, float p_float);

/* Process the given number of samples in inputs and outputs.
*
* Different to process_float how? Never seen any difference.
*
*
* @param pthis Pointer to the effect itself.
* @param inputs Pointer to an array of 'const float[samples]' with size numInputs.
* @param outputs Pointer to an array of 'float[samples]' with size numOutputs.
* @param samples Number of samples per channel in inputs.
*/
void(VST_FUNCTION_INTERFACE* process)(vst_effect* pthis, const float* const* inputs, float** outputs,
int32_t samples);
int32_t samples);

/* Updates the value for the parameter at the given index, or does nothing if out of bounds.
*
*
* @param pthis Pointer to the effect itself.
* @param index Parameter index.
* @param value New value for the parameter.
@@ -840,7 +853,7 @@ struct vst_effect {
void(VST_FUNCTION_INTERFACE* set_parameter)(vst_effect* pthis, uint32_t index, float value);

/* Returns the value stored for the parameter at index, or 0 if out of bounds.
*
*
* @param pthis Pointer to the effect itself.
* @param index Parameter index.
* @return float Value of the parameter.
@@ -853,7 +866,7 @@ struct vst_effect {
int32_t num_outputs; // Number of outputs.

/* Bitflags
*
*
* Bit Description
* 1 Effect has "Editor"
* 2 Unknown (Found in: ReaDelay)
@@ -872,7 +885,7 @@ struct vst_effect {

/* Initial delay before processing of samples can actually begin in Samples.
*
* Should be updated before or during handling the 0x47 control call.
* Should be updated before or during handling the 0x47 control call.
*/
int32_t delay;

@@ -884,16 +897,16 @@ struct vst_effect {

/* Id of the plugin.
*
* Due to this not being enough for uniqueness, it should not be used alone
* Due to this not being enough for uniqueness, it should not be used alone
* for indexing. Ideally you want to index like this:
* [unique_id][module_name][version][flags]
* If any of the checks after unique_id fail, you default to the first
* If any of the checks after unique_id fail, you default to the first
* possible choice.
*/
int32_t unique_id;

/* Plugin version
*
*
* Unrelated to the minimum VST Version, but often the same.
*/
int32_t version;
@@ -908,19 +921,19 @@ struct vst_effect {
* @param samples Number of samples per channel in inputs.
*/
void(VST_FUNCTION_INTERFACE* process_float)(vst_effect* pthis, const float* const* inputs, float** outputs,
int32_t samples);
int32_t samples);

/* Process the given number of double samples in inputs and outputs.
*
* Used only by 2.4 hosts and plugins, possibly restricted to said version.
*
*
* @param pthis Pointer to the effect itself.
* @param inputs Pointer to an array of 'const double[samples]' with size numInputs.
* @param outputs Pointer to an array of 'double[samples]' with size numOutputs.
* @param samples Number of samples per channel in inputs.
*/
void(VST_FUNCTION_INTERFACE* process_double)(vst_effect* pthis, const double* const* inputs, double** outputs,
int32_t samples);
int32_t samples);

// Everything after this is unknown and was present in reacomp-standalone.dll.
uint8_t _unknown[56]; // 56-bytes of something. Could also just be 52-bytes.
@@ -969,13 +982,13 @@ struct vst_speaker_arrangement {
};

/* Callback used by the plugin to interface with the host.
*
*
* @param opcode See VST_HOST_OPCODE
* @param p_str Zero terminated string or null on call.
* @return ?
*/
typedef intptr_t (*vst_host_callback)(vst_effect* plugin, VST_HOST_OPCODE opcode, int32_t p_int1, int64_t p_int2,
void* p_str, float p_float);
void* p_str, float p_float);

/* Entry point for VST2.x plugins.
*


Loading…
Cancel
Save