mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-07 04:00:09 +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(
|
||||
|
||||
+8
-2
@@ -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)
|
||||
@@ -49,7 +49,13 @@ namespace NAM {
|
||||
|
||||
if (file_path && (file_path->size > 0))
|
||||
{
|
||||
namModel = get_dsp((const char*)LV2_ATOM_BODY_CONST(file_path));
|
||||
try
|
||||
{
|
||||
namModel = get_dsp((const char*)LV2_ATOM_BODY_CONST(file_path));
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user