If the state miniaudio side of the device does not match the actual
state of the backend side of it, such as when the device is stopped but
the backend doesn't post a notification, attempting to stop the device
might result in a deadlock.
This is a just a quick workaround hack for the moment while a more
robust solution is figured out.
https://github.com/mackron/miniaudio/issues/717
The SSE2 code paths for mono expansion introduced in Version 0.11.15
mixed up the parameters of `_mm_shuffle_ps()`, which in turn caused
adjacent PCM frames to be swapped in the channel-expanded output.
With this commit, custom backends can now be implemented as
self-contained modules that can easily be plugged in and mixed and
matched depending on a programs requirements. The order in which
custom backends are specified in the context config determine their
priority.
This commit updates the custom_backend example by moving the SDL
code out into its own file in "extras/backends/sdl". The example will
now just include the SDL code files like normal. This represents a more
realistic scenario.
This unifies, as much as possible, the ScriptProcessorNode path with
the AudioWorklets path to avoid some code duplication, and to also make
the two paths more similar to each other to ease in maintenance.
This adds the following APIs:
* ma_sound_stop_with_fade_in_pcm_frames()
* ma_sound_stop_with_fade_in_milliseconds()
* ma_sound_set_stop_time_with_fade_in_pcm_frames()
* ma_sound_set_stop_time_with_fade_in_milliseconds()
These functions will overwrite any existing fades. For the
set_stop_time variants, you specify the time that the sound will be put
into it's stopped state. The fade will start at stopTime - fadeLength.
If the fade length is greater than the stop time, the fade length will
be clamped.
Public issue https://github.com/mackron/miniaudio/issues/669