aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/null.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/null.cpp')
-rw-r--r--alc/backends/null.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/alc/backends/null.cpp b/alc/backends/null.cpp
index b6b115f1..aca59605 100644
--- a/alc/backends/null.cpp
+++ b/alc/backends/null.cpp
@@ -31,6 +31,7 @@
#include <thread>
#include "alcmain.h"
+#include "alexcpt.h"
#include "almalloc.h"
#include "alu.h"
#include "logging.h"
@@ -51,7 +52,7 @@ struct NullBackend final : public BackendBase {
int mixerProc();
- ALCenum open(const ALCchar *name) override;
+ void open(const ALCchar *name) override;
bool reset() override;
bool start() override;
void stop() override;
@@ -108,16 +109,14 @@ int NullBackend::mixerProc()
}
-ALCenum NullBackend::open(const ALCchar *name)
+void NullBackend::open(const ALCchar *name)
{
if(!name)
name = nullDevice;
else if(strcmp(name, nullDevice) != 0)
- return ALC_INVALID_VALUE;
+ throw al::backend_exception{ALC_INVALID_VALUE, "Device name \"%s\" not found", name};
mDevice->DeviceName = name;
-
- return ALC_NO_ERROR;
}
bool NullBackend::reset()