Add new ma_device_notification_type_unlocked notification

Unlocked notification fires on emscripten upon successful resume of
audio context attached to a device.  This occurs only once per device
and it happens after the browser has received the input event
necessary to begin playing audio on most webpages.  This is due
to autoplay rules.

It is recommended to wait until this event is fired to start a
'main game loop' on the web.
This commit is contained in:
Michael Labbé
2023-11-10 21:18:05 -08:00
committed by David Reid
parent f9ce46330c
commit 8fcf6889aa
2 changed files with 22 additions and 3 deletions
+2 -1
View File
@@ -3013,7 +3013,8 @@ typedef enum
ma_device_notification_type_stopped,
ma_device_notification_type_rerouted,
ma_device_notification_type_interruption_began,
ma_device_notification_type_interruption_ended
ma_device_notification_type_interruption_ended,
ma_device_notification_type_unlocked
} ma_device_notification_type;
typedef struct