diff --git a/include/app/ModuleWidget.hpp b/include/app/ModuleWidget.hpp index 9a81ad5d..b2865392 100644 --- a/include/app/ModuleWidget.hpp +++ b/include/app/ModuleWidget.hpp @@ -95,10 +95,10 @@ struct ModuleWidget : widget::OpaqueWidget { */ virtual void appendContextMenu(ui::Menu* menu) {} - PRIVATE math::Vec& dragOffset(); - PRIVATE bool& dragEnabled(); - PRIVATE math::Vec& oldPos(); - PRIVATE engine::Module* releaseModule(); + INTERNAL math::Vec& dragOffset(); + INTERNAL bool& dragEnabled(); + INTERNAL math::Vec& oldPos(); + INTERNAL engine::Module* releaseModule(); }; diff --git a/include/common.hpp b/include/common.hpp index e98849cf..e187a42c 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -35,7 +35,7 @@ E.g. /** Attribute for private functions and symbols not intended to be used by plugins. By default this does nothing, but when #including rack.hpp, it prints a compile-time warning. */ -#define PRIVATE +#define INTERNAL __attribute__((visibility("internal"))) /** Concatenates two literals or two macros diff --git a/include/engine/Engine.hpp b/include/engine/Engine.hpp index 4e50dd25..2af1f846 100644 --- a/include/engine/Engine.hpp +++ b/include/engine/Engine.hpp @@ -28,7 +28,7 @@ struct Engine { Write-locks. */ void clear(); - PRIVATE void clear_NoLock(); + INTERNAL void clear_NoLock(); /** Advances the engine by `frames` frames. Only call this method from the primary module. Read-locks. Also locks so only one stepBlock() can be called simultaneously or recursively. @@ -48,7 +48,7 @@ struct Engine { /** Sets the sample rate to step the modules. Write-locks. */ - PRIVATE void setSampleRate(float sampleRate); + INTERNAL void setSampleRate(float sampleRate); /** Sets the sample rate if the sample rate in the settings is "Auto". Write-locks. */ @@ -107,7 +107,7 @@ struct Engine { Write-locks. */ void removeModule(Module* module); - PRIVATE void removeModule_NoLock(Module* module); + INTERNAL void removeModule_NoLock(Module* module); /** Checks whether a Module is in the rack. Read-locks. */ @@ -160,7 +160,7 @@ struct Engine { Write-locks. */ void removeCable(Cable* cable); - PRIVATE void removeCable_NoLock(Cable* cable); + INTERNAL void removeCable_NoLock(Cable* cable); /** Checks whether a Cable is in the rack. Read-locks. */ @@ -190,7 +190,7 @@ struct Engine { Write-locks. */ void removeParamHandle(ParamHandle* paramHandle); - PRIVATE void removeParamHandle_NoLock(ParamHandle* paramHandle); + INTERNAL void removeParamHandle_NoLock(ParamHandle* paramHandle); /** Returns the unique ParamHandle for the given paramId Read-locks. */ diff --git a/include/engine/Module.hpp b/include/engine/Module.hpp index 63459bf5..cd95073f 100644 --- a/include/engine/Module.hpp +++ b/include/engine/Module.hpp @@ -345,11 +345,11 @@ struct Module { virtual void onSampleRateChange() {} bool isBypassed(); - PRIVATE void setBypassed(bool bypassed); - PRIVATE const float* meterBuffer(); - PRIVATE int meterLength(); - PRIVATE int meterIndex(); - PRIVATE void doProcess(const ProcessArgs& args); + INTERNAL void setBypassed(bool bypassed); + INTERNAL const float* meterBuffer(); + INTERNAL int meterLength(); + INTERNAL int meterIndex(); + INTERNAL void doProcess(const ProcessArgs& args); }; diff --git a/include/rack.hpp b/include/rack.hpp index 5c4d3215..601fd8c2 100644 --- a/include/rack.hpp +++ b/include/rack.hpp @@ -99,8 +99,8 @@ #include -#undef PRIVATE -#define PRIVATE __attribute__((error ("Using private function or symbol"))) +#undef INTERNAL +#define INTERNAL __attribute__((visibility("internal"))) __attribute__((error ("Using function or symbol internal to Rack"))) namespace rack { diff --git a/src/core/AudioInterface.cpp b/src/core/AudioInterface.cpp index 5e65a70d..608794a2 100644 --- a/src/core/AudioInterface.cpp +++ b/src/core/AudioInterface.cpp @@ -283,6 +283,7 @@ struct AudioInterface : Module, audio::Port { // engine input -> audio output dsp::Frame outputAudioBuffer[frames]; int inputFrames = inputBuffer.size(); + DEBUG("frames %d, inputFrames %d", frames, inputFrames); int outputAudioFrames = frames; inputSrc.process(inputBuffer.startData(), &inputFrames, outputAudioBuffer, &outputAudioFrames); inputBuffer.startIncr(inputFrames);