mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-07 04:00:09 +02:00
Update NeuralAudio (better RTNeural NAM performance)
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ project(NeuralAmpModelerLv2 VERSION 0.1.5)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule deps/NeuralAudio updated: 8678eff6ab...8b6a83169a
+8
-2
@@ -48,16 +48,22 @@ if (DISABLE_DENORMALS)
|
||||
add_definitions(-DDISABLE_DENORMALS)
|
||||
endif (DISABLE_DENORMALS)
|
||||
|
||||
option(LSTM_PREFER_NAM "Always use NAM Core for NAM LSTM models" OFF)
|
||||
option(LSTM_PREFER_NAM "Always use NAM Core for NAM LSTM models" ON)
|
||||
|
||||
if (LSTM_PREFER_NAM)
|
||||
add_definitions(-DLSTM_PREFER_NAM)
|
||||
message("Using NAM Core for LSTM models")
|
||||
else()
|
||||
message("Using RTNeural for LSTM models")
|
||||
endif (LSTM_PREFER_NAM)
|
||||
|
||||
option(WAVENET_PREFER_NAM "Always use NAM Core for NAM WaveNet models" ON)
|
||||
option(WAVENET_PREFER_NAM "Always use NAM Core for NAM WaveNet models" OFF)
|
||||
|
||||
if (WAVENET_PREFER_NAM)
|
||||
add_definitions(-DWAVENET_PREFER_NAM)
|
||||
message("Using NAM Core for WaveNet models")
|
||||
else()
|
||||
message("Using RTNeural for WaveNet models")
|
||||
endif (WAVENET_PREFER_NAM)
|
||||
|
||||
set_target_properties(neural_amp_modeler
|
||||
|
||||
+8
-1
@@ -190,6 +190,13 @@ namespace NAM {
|
||||
return LV2_WORKER_SUCCESS;
|
||||
}
|
||||
|
||||
void Plugin::set_max_buffer_size(int size) noexcept
|
||||
{
|
||||
maxBufferSize = size;
|
||||
|
||||
NeuralAudio::NeuralModel::SetDefaultMaxAudioBufferSize(size);
|
||||
}
|
||||
|
||||
void Plugin::process(uint32_t n_samples) noexcept
|
||||
{
|
||||
lv2_atom_forge_set_buffer(&atom_forge, (uint8_t*)ports.notify, ports.notify->atom.size);
|
||||
@@ -326,7 +333,7 @@ namespace NAM {
|
||||
{
|
||||
if (options[i].key == nam->uris.bufSize_maxBlockLength && options[i].type == nam->uris.atom_Int)
|
||||
{
|
||||
nam->maxBufferSize = *(const int32_t*)options[i].value;
|
||||
nam->set_max_buffer_size(*(const int32_t*)options[i].value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -79,6 +79,7 @@ namespace NAM {
|
||||
~Plugin();
|
||||
|
||||
bool initialize(double rate, const LV2_Feature* const* features) noexcept;
|
||||
void set_max_buffer_size(int size) noexcept;
|
||||
void process(uint32_t n_samples) noexcept;
|
||||
|
||||
void write_current_path();
|
||||
@@ -118,6 +119,6 @@ namespace NAM {
|
||||
|
||||
float inputLevel = 0;
|
||||
float outputLevel = 0;
|
||||
int32_t maxBufferSize = 0;
|
||||
int32_t maxBufferSize = 512;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user