Certain backends don't need a buffer size to be a strict multiple of the period
count, which allows a little more flexibility. The period/update size simply
acts as the minimum request, which helps control CPU load by determining how
often parameter and other pre-mixing updates are processed.
So we actually have a device name to get the initial settings for. Be aware
that some backends set a format when opening instead of on reset, so such
devices will only set the default format (it can't get a desired format without
the device name, but the format will already be set once that's known). The
affected backends are WinMM, SDL2, and PortAudio (none of which are generally
used). This could be fixed by reopening the device during reset, but it would
need to be done carefully.
It was never actually called anywhere, and there's no safe place where it can
be called. It's probably better to let the individual backends worry about
cleaning themselves up anyway.
Effectively makes the functions act as noexcept, since there's no meaningful
reason to propogate exceptions from "C" functions. Currently only applied to
ALC functions, but can incrementally be applied to AL functions too. In the
future, this could also handle ALC and AL errors with unique exception types
(functions that utilize this behavior would need to ensure proper cleanup).
The HRTF mixers now get a full input buffer with the history prepended, so the
delay offsets just need to account for the start point and read forward for
each sample.
This extracts the definition info it can from the SOFA, and uses the same logic
as sofa-info to automatically detect an appropriate layout. There is a bit of
code duplication from loaddef.cpp and sofa-info.cpp, though there are slight
modifications.