mackron / miniaudio

Audio playback and capture library written in C, in a single source file.
https://miniaud.io
Other
4.07k stars 361 forks source link

Add a pDevice handle to the Web Audio device index when using worklets #888

Closed teropa closed 2 months ago

teropa commented 2 months ago

This matches the handle added for script processor node devices in #771

Without this in place the context unlocking callbacks will throw errors on page interactions, because they assume a pDevice property is in place. I believe this was added in the script processor code paths in #771, but was missing on the worklet code paths.

The error:

RuntimeError: Aborted(Assertion failed: notification.pDevice != ((void*)0), at: miniaudio.h,18717,ma_device__on_notification)
mackron commented 2 months ago

Thanks. That'll probably fix this issue as well: https://github.com/mackron/miniaudio/issues/886. Merged.