This was incorrectly choosing the wrong endian-specific sample format
when the endian.h header was not included. This commit switches to
runtime endian detection.
This removes the "wait" concept and replaces it with an extra parameter
for the step() callback for the blocking mode, which can be blocking or
non-blocking.
This also implements the wake() callback for waking up from a blocking
step.
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.
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.