Fixes#721
Changes to a dependency library broke compilation of the example. Changes needed to get the example working and warning-free include:
1. specifying additional type constraints in local implementations
2. using the `FromSample` trait to convert samples in the handler
3. adding a default matcher in response to the non-exhaustive attribute on `SampleFormat`
Also adds a github action to ensure the wasm-beep example compiles.
* Add rustdoc links in most of the documentation
Additionally, fix a couple of references to old
renamed types still lingering in the docs :)
Fixes#650
* Rustfmt on documentation changes
* Make docs for impl_platform_host not build example
* bump linux dependencies, dev-dependencies, anyhow, hound, ringbuf
* update to clap v4 and simplify examples with clap_derive
* have libjack installed when running with --all-features
* don't force the patch version for libc
* allow room for version resolution with nix
* nix dependency not used anymore, remove it
* add timeout paramter to DeviceTrait stream builders
This makes it possible for the library client to handle situations where the host
takes too long to respond or even blocks forever, eg. a retry can be applied.
if the timeout passed is "None" the current behaviour is applied, eg. blocking forever.
if the timeout passed is a Duration then it will be applied to the Device Streams.
This is only implemented for ALSA, the other hosts will ignore the parameter for now.
Signed-off-by: Marc Bodmer <marc.bodmer@securiton.ch>
* Create AudioObjectPropertyListener type, providing an easy way to attach a Rust callback.
* Refactor the existing sample rate update mechanism to use AudioObjectPropertyListener.
* Add an optional property listener that registers a callback that is triggered on device disconnection.
* Create a set_on_disconnect method to register the disconnection callback.
I migrated to `windows-rs` in this PR since exposing the buffer size range for hardware-offloaded audio processing requires `IAudioClient2`, which isn't exposed in the `winapi` crate, and `winapi` seems to be more or less unmaintained at this point.
* Basic type conversion
* Make everything compile!
* Fix warnings
* Implement buffer sizing for wasapi
* Convert tabs to spaces
* Run cargo fmt
* Remove winapi from Cargo.toml
* Remove unused commented code from wasapi, and fix lingering TODOs
* Fix compile error
* Update to windows 0.37.0
* Run rustfmt
* Work around rustfmt nested tuple issues
* Improve readability of guid comparison code
In most cases, device with index 0 is NOT the default output device - in my case it happens to be the ear speaker. Returning Device(None) there makes Oboe choose the default input/output device - everything works as expected.