Add "nam" namespace

This commit is contained in:
Mike Oliphant
2024-08-17 11:23:52 -07:00
parent 1dc54bc5f9
commit 61bbce1e2a
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index)
{
if (index == 0) {
// Turn on fast tanh approximation
activations::Activation::enable_fast_tanh();
nam::activations::Activation::enable_fast_tanh();
return &descriptor;
}
+2 -2
View File
@@ -88,7 +88,7 @@ namespace NAM {
auto msg = static_cast<const LV2LoadModelMsg*>(data);
auto nam = static_cast<NAM::Plugin*>(instance);
::DSP* model = nullptr;
nam::DSP* model = nullptr;
LV2SwitchModelMsg response = { kWorkTypeSwitch, {}, {} };
LV2_Worker_Status result = LV2_WORKER_SUCCESS;
@@ -107,7 +107,7 @@ namespace NAM {
{
lv2_log_trace(&nam->logger, "Staging model change: `%s`\n", msg->path);
model = get_dsp(msg->path).release();
model = nam::get_dsp(msg->path).release();
// Pre-run model to ensure all needed buffers are allocated in advance
if (const int32_t numSamples = nam->maxBufferSize)
+3 -3
View File
@@ -43,12 +43,12 @@ namespace NAM {
struct LV2SwitchModelMsg {
LV2WorkType type;
char path[MAX_FILE_NAME];
::DSP* model;
nam::DSP* model;
};
struct LV2FreeModelMsg {
LV2WorkType type;
::DSP* model;
nam::DSP* model;
};
class Plugin {
@@ -70,7 +70,7 @@ namespace NAM {
LV2_Log_Logger logger = {};
LV2_Worker_Schedule* schedule = nullptr;
::DSP* currentModel = nullptr;
nam::DSP* currentModel = nullptr;
std::string currentModelPath;
float prevDCInput = 0;
float prevDCOutput = 0;