mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-06 19:50:11 +02:00
Update NeuralAudio (add ".aidax" extension")
This commit is contained in:
Vendored
+1
-1
Submodule deps/NeuralAudio updated: 15f9f2a78d...71fdb1ef29
+7
-14
@@ -115,31 +115,24 @@ namespace NAM {
|
|||||||
lv2_log_trace(&nam->logger, "Staging model change: `%s`\n", msg->path);
|
lv2_log_trace(&nam->logger, "Staging model change: `%s`\n", msg->path);
|
||||||
|
|
||||||
model = NeuralAudio::NeuralModel::CreateFromFile(msg->path);
|
model = NeuralAudio::NeuralModel::CreateFromFile(msg->path);
|
||||||
|
|
||||||
// Pre-run model to ensure all needed buffers are allocated in advance
|
|
||||||
//if (const int32_t numSamples = nam->maxBufferSize)
|
|
||||||
//{
|
|
||||||
// float* buffer = new float[numSamples];
|
|
||||||
// memset(buffer, 0, numSamples * sizeof(float));
|
|
||||||
|
|
||||||
// model->Process(buffer, buffer, numSamples);
|
|
||||||
// //model->finalize_(numSamples);
|
|
||||||
|
|
||||||
// delete[] buffer;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (model != nullptr)
|
||||||
|
{
|
||||||
response.model = model;
|
response.model = model;
|
||||||
|
|
||||||
memcpy(response.path, msg->path, pathlen);
|
memcpy(response.path, msg->path, pathlen);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (const std::exception&)
|
catch (const std::exception&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model == nullptr)
|
||||||
{
|
{
|
||||||
response.path[0] = '\0';
|
response.path[0] = '\0';
|
||||||
|
|
||||||
lv2_log_error(&nam->logger, "Unable to load model from: '%s'\n", msg->path);
|
lv2_log_error(&nam->logger, "Unable to load model from: '%s'\n", msg->path);
|
||||||
|
|
||||||
//result = LV2_WORKER_ERR_UNKNOWN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
respond(handle, sizeof(response), &response);
|
respond(handle, sizeof(response), &response);
|
||||||
|
|||||||
Reference in New Issue
Block a user