diff --git a/NOTICE.md b/NOTICE.md
index 516e5677f2..aeb97eefa7 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -34,12 +34,9 @@ public domain. For details, see [project/lib/lzma/](project/lzma).
This product bundles mbedTLS 2.6.0, which is available under an
"Apache 2.0" license. For details, see [project/lib/mbedtls/](project/lib).
-This product bundles OpenAL-Soft 1.19.0, which is available under an
+This product bundles OpenAL-Soft 1.25.1, which is available under an
"LGPLv2" license. For details, see [project/lib/openal/](project/lib).
-_OpenAL-Soft is only included in dynamically-linked builds, it is excluded
-from Lime static builds in order to preserve Lime's permissive nature._
-
This product bundles pixman 0.32.8, which is available under an
"MIT" license. For details, see [project/lib/pixman/](project/lib).
diff --git a/project/lib/custom/openal/include/platforms/android/config_backends.h b/project/lib/custom/openal/include/platforms/android/config_backends.h
index 846380f595..e3de1614db 100644
--- a/project/lib/custom/openal/include/platforms/android/config_backends.h
+++ b/project/lib/custom/openal/include/platforms/android/config_backends.h
@@ -1,3 +1,13 @@
+#ifdef NATIVE_TOOLKIT_HAVE_SDL
+
+#define HAVE_OPENSL 0
+
+#else
+
+#define HAVE_OPENSL 1
+
+#endif
+
#define HAVE_ALSA 0
#define HAVE_OSS 0
@@ -22,6 +32,4 @@
#define HAVE_COREAUDIO 0
-#define HAVE_OPENSL 1
-
#define HAVE_OBOE 0
diff --git a/project/lib/custom/openal/include/platforms/apple/config_backends.h b/project/lib/custom/openal/include/platforms/apple/config_backends.h
index 0bb6c9b8e0..5a58db4e98 100644
--- a/project/lib/custom/openal/include/platforms/apple/config_backends.h
+++ b/project/lib/custom/openal/include/platforms/apple/config_backends.h
@@ -1,3 +1,13 @@
+#ifdef NATIVE_TOOLKIT_HAVE_SDL
+
+#define HAVE_COREAUDIO 0
+
+#else
+
+#define HAVE_COREAUDIO 1
+
+#endif
+
#define HAVE_ALSA 0
#define HAVE_OSS 0
@@ -20,8 +30,6 @@
#define HAVE_JACK 0
-#define HAVE_COREAUDIO 1
-
#define HAVE_OPENSL 0
#define HAVE_OBOE 0
diff --git a/project/lib/custom/openal/include/platforms/linux/config_backends.h b/project/lib/custom/openal/include/platforms/linux/config_backends.h
index c2a67ff433..8fde1bce3b 100644
--- a/project/lib/custom/openal/include/platforms/linux/config_backends.h
+++ b/project/lib/custom/openal/include/platforms/linux/config_backends.h
@@ -1,9 +1,23 @@
-#define HAVE_ALSA 1
+#ifdef NATIVE_TOOLKIT_HAVE_SDL
-#define HAVE_OSS 0
+#define HAVE_ALSA 0
+
+#define HAVE_PIPEWIRE 0
+
+#define HAVE_PULSEAUDIO 0
+
+#else
+
+#define HAVE_ALSA 1
#define HAVE_PIPEWIRE 1
+#define HAVE_PULSEAUDIO 1
+
+#endif
+
+#define HAVE_OSS 0
+
#define HAVE_SOLARIS 0
#define HAVE_SNDIO 0
@@ -16,8 +30,6 @@
#define HAVE_PORTAUDIO 0
-#define HAVE_PULSEAUDIO 1
-
#define HAVE_JACK 0
#define HAVE_COREAUDIO 0
diff --git a/project/lib/custom/openal/include/platforms/windows/config_backends.h b/project/lib/custom/openal/include/platforms/windows/config_backends.h
index 55bf169b75..39ce4b1bad 100644
--- a/project/lib/custom/openal/include/platforms/windows/config_backends.h
+++ b/project/lib/custom/openal/include/platforms/windows/config_backends.h
@@ -1,3 +1,17 @@
+#ifdef NATIVE_TOOLKIT_HAVE_SDL
+
+#define HAVE_WASAPI 0
+
+#define HAVE_DSOUND 0
+
+#else
+
+#define HAVE_WASAPI 1
+
+#define HAVE_DSOUND 1
+
+#endif
+
#define HAVE_ALSA 0
#define HAVE_OSS 0
@@ -8,10 +22,6 @@
#define HAVE_SNDIO 0
-#define HAVE_WASAPI 1
-
-#define HAVE_DSOUND 1
-
#define HAVE_WINMM 0
#define HAVE_PORTAUDIO 0
diff --git a/project/lib/custom/openal/include/version.h b/project/lib/custom/openal/include/version.h
index 46d0fe2c94..9eb13e4cab 100644
--- a/project/lib/custom/openal/include/version.h
+++ b/project/lib/custom/openal/include/version.h
@@ -6,4 +6,4 @@
#define ALSOFT_GIT_BRANCH "master"
/* Define the hash of the head commit */
-#define ALSOFT_GIT_COMMIT_HASH "1d52120"
+#define ALSOFT_GIT_COMMIT_HASH "0887e589"
diff --git a/project/lib/openal b/project/lib/openal
index e9c479eb41..0887e589fe 160000
--- a/project/lib/openal
+++ b/project/lib/openal
@@ -1 +1 @@
-Subproject commit e9c479eb4190101bc51179afae56fc6dd5d26066
+Subproject commit 0887e589fe2cc973fe0f5b9b61105711f2b35d79
diff --git a/project/lib/openal-files.xml b/project/lib/openal-files.xml
index c021774e52..cd7c0ce42e 100644
--- a/project/lib/openal-files.xml
+++ b/project/lib/openal-files.xml
@@ -131,13 +131,15 @@
+
+
+
-
-
@@ -201,6 +201,7 @@
+
diff --git a/src/lime/media/AudioManager.hx b/src/lime/media/AudioManager.hx
index c755401941..c683fbcae7 100644
--- a/src/lime/media/AudioManager.hx
+++ b/src/lime/media/AudioManager.hx
@@ -54,15 +54,10 @@ class AudioManager
alc.makeContextCurrent(ctx);
alc.processContext(ctx);
- #if (lime_openalsoft && !mobile)
- if (alc.isExtensionPresent('ALC_SOFT_system_events', device) && alc.isExtensionPresent('ALC_SOFT_reopen_device', device))
+ #if (lime_openalsoft)
+ if (alc.isExtensionPresent('AL_SOFT_hold_on_disconnect'))
{
- if (alc.isExtensionPresent('AL_SOFT_hold_on_disconnect'))
- alc.disable(AL.STOP_SOURCES_ON_DISCONNECT_SOFT);
-
- alc.eventControlSOFT([ALC.EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT, ALC.EVENT_TYPE_DEVICE_ADDED_SOFT, ALC.EVENT_TYPE_DEVICE_REMOVED_SOFT], true);
-
- alc.eventCallbackSOFT(deviceEventCallback);
+ alc.disable(AL.STOP_SOURCES_ON_DISCONNECT_SOFT);
}
#end
}
@@ -139,39 +134,6 @@ class AudioManager
#end
}
- #if lime_openalsoft
- @:noCompletion
- private static function deviceEventCallback(eventType:Int, deviceType:Int, handle:CFFIPointer, message:#if hl hl.Bytes #else String #end):Void
- {
- #if !lime_doc_gen
- if (eventType == ALC.EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT && deviceType == ALC.PLAYBACK_DEVICE_SOFT)
- {
- var device = new ALDevice(handle);
-
- MainLoop.runInMainThread(function():Void
- {
- var alc = context.openal;
-
- if (device == null)
- {
- var currentContext = alc.getCurrentContext();
-
- var device = alc.getContextsDevice(currentContext);
-
- if (device != null)
- alc.reopenDeviceSOFT(device, null, null);
- }
- else
- {
- alc.reopenDeviceSOFT(device, null, null);
- }
-
- });
- }
- #end
- }
- #end
-
@:noCompletion
private static function setupConfig():Void
{