It is technically possible for a backend to create a thread which
calls `ma_context/device_get_backend_state()` before miniaudio has
set the internal pointer.
Device information retrieval is now implemented in terms of device
enumeration. Backends should now return any information that would have
been returned from `onContextGetDeviceInfo` straight from
`onContextEnumerateDevices` instead.
The callback passed into `ma_context_enumerate_devices()` would
previously return a boolean, with true telling miniaudio to continue
enumeration, and false to abort. This got a bit confusing to read at
times, so I've decided to make this more explicit.
The new return type is an enum called `ma_device_enumeration_result`.
Instead of returning true to continue enumeration, the new return value
is `MA_DEVICE_ENUMERATION_CONTINUE`. Similarly, instead of returning
false to abort enumeration, `MA_DEVICE_ENUMERATION_ABORT` should be
returned instead.
* Fix an error with the recent refactoring work.
* Fix some build errors with the UWP build.
* Update device enumeration to include format information.
Harmless warning on FreeBSD 14.2,
https://cirrus-ci.com/task/4700955851096064?logs=build#L44
```
../subprojects/miniaudio-0.11.22/miniaudio.h:36997:36: warning: a
function declaration without a prototype is deprecated in all versions
of C [-Wstrict-prototypes]
36997 | static int ma_open_temp_device__oss()
| ^
| void
```
* Device enumeration will now report that any channel count is
supported.
* When initializing the device, the exact number of channels (ports)
will be registered to the client as requested.
Public issue https://github.com/mackron/miniaudio/issues/851
* Device enumeration has been updated to report detailed format
information.
* A noAutoConnect config option has been added the JACK device config.
* The number of ports used by the device will be equal to the
requested channel count, up to the maximum number of ports reported
by the client.
This is untested as of this commit.
* Some untested placeholder code has been removed for non-Android
builds. This was adding unnecessary complexity.
* Device enumeration now includes detailed info.
* Device enumeration will now mark appropriate devices as default.
* The onContextGetDeviceInfo backend callback has been removed so that
all device info is retrieved from the enumeration process.
These changes add initial support for OSSv3. Where this is of particular
note is Linux which never updated to OSSv4. This compiles on Linux, but
I have not yet tested this at run time. Future commits will enable the
OSS backend for Linux which will be useful for getting miniaudio working
on very old versions of Linux.
In this case, device information will be retrieved through device
enumeration. This callback will eventually be removed entirely once all
backends have been updated.
This also removes the `performanceProfile` config option from
`ma_device_config`. Increase the period size if you want to be more
conservative.
Backends that have their own notion of a "latency hint" or the like will
have those options exposed via a backend-specific configuration option.
This renames the `ma_device_state` enum to `ma_device_status`, and also
renames `ma_device_get_state()` to `ma_device_get_status()`.
The reason for this change is that the new backend system uses the
notion of a "state" for backend-specific state for devices. This change
is just to avoid ambiguity between the two concepts.