aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/opensl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/opensl.cpp')
-rw-r--r--alc/backends/opensl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 917e097f..cae17ce1 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -316,6 +316,9 @@ void OpenSLPlayback::open(const char *name)
throw al::backend_exception{al::backend_error::NoDevice, "Device name \"%s\" not found",
name};
+ /* There's only one device, so if it's already open, there's nothing to do. */
+ if(mEngineObj) return;
+
// create engine
SLresult result{slCreateEngine(&mEngineObj, 0, nullptr, 0, nullptr, nullptr)};
PRINTERR(result, "slCreateEngine");