Browse Source

Rename PRIVATE macro to INTERNAL.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
357bd847bf
6 changed files with 18 additions and 17 deletions
  1. +4
    -4
      include/app/ModuleWidget.hpp
  2. +1
    -1
      include/common.hpp
  3. +5
    -5
      include/engine/Engine.hpp
  4. +5
    -5
      include/engine/Module.hpp
  5. +2
    -2
      include/rack.hpp
  6. +1
    -0
      src/core/AudioInterface.cpp

+ 4
- 4
include/app/ModuleWidget.hpp View File

@@ -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();
};




+ 1
- 1
include/common.hpp View File

@@ -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


+ 5
- 5
include/engine/Engine.hpp View File

@@ -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.
*/


+ 5
- 5
include/engine/Module.hpp View File

@@ -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);
};




+ 2
- 2
include/rack.hpp View File

@@ -99,8 +99,8 @@
#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 {


+ 1
- 0
src/core/AudioInterface.cpp View File

@@ -283,6 +283,7 @@ struct AudioInterface : Module, audio::Port {
// engine input -> audio output
dsp::Frame<NUM_AUDIO_OUTPUTS> 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);


Loading…
Cancel
Save