mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-06-19 18:03:59 +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
|
add_library(neural_amp_modeler MODULE
|
||||||
nam_lv2.cpp
|
nam_lv2.cpp
|
||||||
nam_plugin.cpp
|
nam_plugin.cpp
|
||||||
nam_plugin.hpp
|
nam_plugin.h
|
||||||
dsp.h
|
dsp.h
|
||||||
dsp.cpp
|
dsp.cpp
|
||||||
get_dsp.cpp
|
get_dsp.cpp
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include <lv2/log/logger.h>
|
#include <lv2/log/logger.h>
|
||||||
#include <lv2/worker/worker.h>
|
#include <lv2/worker/worker.h>
|
||||||
|
|
||||||
#include "nam_plugin.hpp"
|
#include "nam_plugin.h"
|
||||||
|
|
||||||
// LV2 Functions
|
// LV2 Functions
|
||||||
static LV2_Handle instantiate(
|
static LV2_Handle instantiate(
|
||||||
|
|||||||
+8
-2
@@ -6,7 +6,7 @@
|
|||||||
#include <lv2/atom/util.h>
|
#include <lv2/atom/util.h>
|
||||||
#include <lv2/patch/patch.h>
|
#include <lv2/patch/patch.h>
|
||||||
|
|
||||||
#include "nam_plugin.hpp"
|
#include "nam_plugin.h"
|
||||||
|
|
||||||
namespace NAM {
|
namespace NAM {
|
||||||
Plugin::Plugin(float rate)
|
Plugin::Plugin(float rate)
|
||||||
@@ -49,7 +49,13 @@ namespace NAM {
|
|||||||
|
|
||||||
if (file_path && (file_path->size > 0))
|
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