commit 2bc955ffb2cf57dd8cec2cdbd3e58a7a8ad56a17
parent 3c8f80c69777345e21db084fdc966317332e8c4f
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sat, 14 Sep 2024 02:15:09 +0200
N2x: throw exception if firmware isn't found
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source/nord/n2x/n2xLib/n2xhardware.cpp b/source/nord/n2x/n2xLib/n2xhardware.cpp
@@ -2,6 +2,7 @@
#include "n2xromloader.h"
#include "dsp56kEmu/threadtools.h"
+#include "synthLib/deviceException.h"
namespace n2x
{
@@ -20,7 +21,7 @@ namespace n2x
, m_semDspAtoB(2)
{
if(!m_rom.isValid())
- return;
+ throw synthLib::DeviceException(synthLib::DeviceError::FirmwareMissing, "No firmware found, expected firmware .bin with a size of " + std::to_string(Rom::MySize) + " bytes");
m_dspA.getPeriph().getEsai().setCallback([this](dsp56k::Audio*){ onEsaiCallbackA(); }, 0);
m_dspB.getPeriph().getEsai().setCallback([this](dsp56k::Audio*){ onEsaiCallbackB(); }, 0);