This makes some tweaks to the ASIO backend in order to fix some cases
where races may have occured. This should allow us to remove the `Sync`
bound on the `Device` and `Host` types.
- Shares the `Device`'s `driver` and `asio_streams` `Arc`s with the
`Stream`s to ensure they remain valid if the `Host` or `Device` are
dropped early.
- Ensures that a stream's callback is removed upon `Drop`.
This adds an implementation of ASIO message handling in a manner that
matches that demonstrated in the SDK's `hostsample.cpp` file.
Also refactors the code to ensure that both `buffer_switch` and
`buffer_switch_time_info` callbacks are handled.
Most of this is an attempt at improving readability and modularity of
the asio-sys crate while attempting to review it for correctness. Still
unsure why glitching is occasionally occuring on output, but recorded
input sounds perfectly clean.
ASIO has a limitation where it only supports loading a single audio
driver at a time. This fixes a common error where CPAL users would
request both the default input device and output device in separate
`load_driver` calls. Now, `load_driver` will return another handle to
the existing driver if the existing driver has the same name.
Currently not compiling - still need to address some global items within
asio-sys, including the `set_callback` function and the double buffer
globals.