DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 400bbd1e40e9aa3f7b2aed2017955cd1a6a384a1
parent 3af2221b4c8e12b43382d1ef2be614e2fe0660de
Author: falkTX <falktx@falktx.com>
Date:   Mon, 26 Feb 2024 18:43:37 +0100

Fix build

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoPluginAU.cpp | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/distrho/src/DistrhoPluginAU.cpp b/distrho/src/DistrhoPluginAU.cpp @@ -293,8 +293,6 @@ public: , fStateCount(fPlugin.getStateCount()) #endif { - const uint32_t bufferSize = fPlugin.getBufferSize(); - if (fParameterCount != 0) { fLastParameterValues = new float[fParameterCount]; @@ -316,6 +314,8 @@ public: #endif #if DPF_AU_NUM_BUFFERS != 0 + const uint32_t bufferSize = fPlugin.getBufferSize(); + fAudioBufferList.mNumberBuffers = DPF_AU_NUM_BUFFERS; for (uint16_t i=0; i<DPF_AU_NUM_BUFFERS; ++i) @@ -1109,7 +1109,9 @@ public: DISTRHO_SAFE_ASSERT_UINT_RETURN(inElement == 0, inElement, kAudioUnitErr_InvalidElement); DISTRHO_SAFE_ASSERT_UINT_RETURN(inDataSize == sizeof(Float64), inDataSize, kAudioUnitErr_InvalidPropertyValue); { + #if DISTRHO_PLUGIN_NUM_INPUTS != 0 || DISTRHO_PLUGIN_NUM_OUTPUTS != 0 const Float64 sampleRate = *static_cast<const Float64*>(inData); + #endif #if DISTRHO_PLUGIN_NUM_INPUTS != 0 if (inScope == kAudioUnitScope_Input) @@ -1887,7 +1889,9 @@ private: #if DISTRHO_PLUGIN_NUM_OUTPUTS != 0 Float64 fSampleRateForOutput; #endif + #if DPF_AU_NUM_BUFFERS != 0 d_AudioBufferList fAudioBufferList; + #endif bool fUsingRenderListeners; // Caching