| @@ -95,10 +95,10 @@ struct ModuleWidget : widget::OpaqueWidget { | |||||
| */ | */ | ||||
| virtual void appendContextMenu(ui::Menu* menu) {} | 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(); | |||||
| }; | }; | ||||
| @@ -35,7 +35,7 @@ E.g. | |||||
| /** Attribute for private functions and symbols not intended to be used by plugins. | /** 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. | 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 | /** Concatenates two literals or two macros | ||||
| @@ -28,7 +28,7 @@ struct Engine { | |||||
| Write-locks. | Write-locks. | ||||
| */ | */ | ||||
| void clear(); | void clear(); | ||||
| PRIVATE void clear_NoLock(); | |||||
| INTERNAL void clear_NoLock(); | |||||
| /** Advances the engine by `frames` frames. | /** Advances the engine by `frames` frames. | ||||
| Only call this method from the primary module. | Only call this method from the primary module. | ||||
| Read-locks. Also locks so only one stepBlock() can be called simultaneously or recursively. | 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. | /** Sets the sample rate to step the modules. | ||||
| Write-locks. | 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". | /** Sets the sample rate if the sample rate in the settings is "Auto". | ||||
| Write-locks. | Write-locks. | ||||
| */ | */ | ||||
| @@ -107,7 +107,7 @@ struct Engine { | |||||
| Write-locks. | Write-locks. | ||||
| */ | */ | ||||
| void removeModule(Module* module); | void removeModule(Module* module); | ||||
| PRIVATE void removeModule_NoLock(Module* module); | |||||
| INTERNAL void removeModule_NoLock(Module* module); | |||||
| /** Checks whether a Module is in the rack. | /** Checks whether a Module is in the rack. | ||||
| Read-locks. | Read-locks. | ||||
| */ | */ | ||||
| @@ -160,7 +160,7 @@ struct Engine { | |||||
| Write-locks. | Write-locks. | ||||
| */ | */ | ||||
| void removeCable(Cable* cable); | void removeCable(Cable* cable); | ||||
| PRIVATE void removeCable_NoLock(Cable* cable); | |||||
| INTERNAL void removeCable_NoLock(Cable* cable); | |||||
| /** Checks whether a Cable is in the rack. | /** Checks whether a Cable is in the rack. | ||||
| Read-locks. | Read-locks. | ||||
| */ | */ | ||||
| @@ -190,7 +190,7 @@ struct Engine { | |||||
| Write-locks. | Write-locks. | ||||
| */ | */ | ||||
| void removeParamHandle(ParamHandle* paramHandle); | void removeParamHandle(ParamHandle* paramHandle); | ||||
| PRIVATE void removeParamHandle_NoLock(ParamHandle* paramHandle); | |||||
| INTERNAL void removeParamHandle_NoLock(ParamHandle* paramHandle); | |||||
| /** Returns the unique ParamHandle for the given paramId | /** Returns the unique ParamHandle for the given paramId | ||||
| Read-locks. | Read-locks. | ||||
| */ | */ | ||||
| @@ -345,11 +345,11 @@ struct Module { | |||||
| virtual void onSampleRateChange() {} | virtual void onSampleRateChange() {} | ||||
| bool isBypassed(); | 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); | |||||
| }; | }; | ||||
| @@ -99,8 +99,8 @@ | |||||
| #include <simd/functions.hpp> | #include <simd/functions.hpp> | ||||
| #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 { | namespace rack { | ||||
| @@ -283,6 +283,7 @@ struct AudioInterface : Module, audio::Port { | |||||
| // engine input -> audio output | // engine input -> audio output | ||||
| dsp::Frame<NUM_AUDIO_OUTPUTS> outputAudioBuffer[frames]; | dsp::Frame<NUM_AUDIO_OUTPUTS> outputAudioBuffer[frames]; | ||||
| int inputFrames = inputBuffer.size(); | int inputFrames = inputBuffer.size(); | ||||
| DEBUG("frames %d, inputFrames %d", frames, inputFrames); | |||||
| int outputAudioFrames = frames; | int outputAudioFrames = frames; | ||||
| inputSrc.process(inputBuffer.startData(), &inputFrames, outputAudioBuffer, &outputAudioFrames); | inputSrc.process(inputBuffer.startData(), &inputFrames, outputAudioBuffer, &outputAudioFrames); | ||||
| inputBuffer.startIncr(inputFrames); | inputBuffer.startIncr(inputFrames); | ||||