mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-06-24 04:47:34 +02:00
catch error if NAM model fails to load
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
add_library(neural_amp_modeler MODULE
|
||||
nam_lv2.cpp
|
||||
nam_plugin.cpp
|
||||
nam_plugin.hpp
|
||||
nam_plugin.h
|
||||
dsp.h
|
||||
dsp.cpp
|
||||
get_dsp.cpp
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include <lv2/log/logger.h>
|
||||
#include <lv2/worker/worker.h>
|
||||
|
||||
#include "nam_plugin.hpp"
|
||||
#include "nam_plugin.h"
|
||||
|
||||
// LV2 Functions
|
||||
static LV2_Handle instantiate(
|
||||
|
||||
+7
-1
@@ -6,7 +6,7 @@
|
||||
#include <lv2/atom/util.h>
|
||||
#include <lv2/patch/patch.h>
|
||||
|
||||
#include "nam_plugin.hpp"
|
||||
#include "nam_plugin.h"
|
||||
|
||||
namespace NAM {
|
||||
Plugin::Plugin(float rate)
|
||||
@@ -48,9 +48,15 @@ namespace NAM {
|
||||
lv2_atom_object_get(obj, uris.patch_value, &file_path, 0);
|
||||
|
||||
if (file_path && (file_path->size > 0))
|
||||
{
|
||||
try
|
||||
{
|
||||
namModel = get_dsp((const char*)LV2_ATOM_BODY_CONST(file_path));
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user