This is in preparation for splitting miniaudio into a split .c/h pair,
away from a single header.
`MINIAUDIO_IMPLEMENTATION` is still supported, but will be removed in
version 0.12 and should be considered deprecated. It's recommended to
start the transition to the new .c file.
The data source implementation of a ma_pcm_rb could possibly return a
frame count of 0 which would in turn result in
ma_data_source_read_pcm_frames() returning MA_AT_END which does not
make sense for a ring buffer since it has no notion of an end.
There is no notion of an "end" in a ring buffer. Also, this result is
returned when the operation completed successfully which makes a result
code other than MA_SUCCESS confusing.
With this commit, when targeting pthreads with the -pthread, the engine
will allow threading with it's internal resource manager.
Public issue https://github.com/mackron/miniaudio/issues/855
Support for this was added to Emscripten 3.1.70. Currently only
querying the quantum size is supported. I believe support for
configuring the quantum size is coming later in Web Audio 1.1.
Compilation with versions of Emscripten earlier than 3.1.70 is still
supported.
This commit removes the calls to ma_device__set_state() and replaces
them with a call to ma_device_stop() which is the intended way for
backends to change the state of the device. In addition, this comes
with the added effect of firing the stop callback when a reroute fails.
This change makes it so that setBufferCapacityInFrames() and
setFramesPerDataCallback() can be opted-in if explicitly requested in
the device config.
This also adds back enableCompatibilityWorkarounds in order to prevent
anyone's build from breaking when updating. This will be removed again
in the 0.12 branch.
ma_context_get_devices and ma_context_enumerate_devices are mutually related
functions.
enumerate_devices's docs refer to get_devices, but get_devices's docs refer to
get_devices by mistake. Change get_devices's docs to refer to enumerate_devices
as intended.