Commit Graph

36 Commits

Author SHA1 Message Date
mitchmindtree 714dab7270 Refactor asio message to use a match expr. Fix some typos. 2019-07-05 13:19:42 +02:00
mitchmindtree b7d40d2993 Handle timed buffer switch and messaging callbacks in asio-sys
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.
2019-07-05 05:51:32 +10:00
mitchmindtree cc5b0555c2 Refactor of asio-sys while reviewing for code correctness
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.
2019-07-05 05:51:31 +10:00
mitchmindtree 91c5aa86b3 Fix Driver destructor behaviour in asio-sys 2019-07-05 05:51:31 +10:00
mitchmindtree c432f2b18d Update asio-sys to allow for having multiple handles to the same driver
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.
2019-07-05 05:51:31 +10:00
mitchmindtree 86e3366063 Remove unnecessary num crate from asio-sys 2019-07-05 05:51:30 +10:00
mitchmindtree c2b7c7f648 Remove .DS_Store from asio-sys gitignore 2019-07-05 05:51:30 +10:00
mitchmindtree 191b90909a Make Driver type responsible for managing user callbacks 2019-07-05 05:51:30 +10:00
mitchmindtree b6181d4362 Add impl Send for AsioStream 2019-07-05 05:51:29 +10:00
mitchmindtree d739a5b79d Majority of ASIO host update following refactor
Currently not compiling - still need to address some global items within
asio-sys, including the `set_callback` function and the double buffer
globals.
2019-07-05 05:51:29 +10:00
mitchmindtree efe683133c Refactor asio-sys to use less global state and more RAII
The asio-sys examples have been tested and still work nicely. The CPAL
asio host has not yet been updated for these changes.
2019-07-05 05:51:29 +10:00
mitchmindtree 747caeee38 Get asio-sys examples working with latest API updates 2019-07-05 05:51:28 +10:00
Tom Gowan ab3b76ad75 fixes, remove transmute 2019-07-05 05:51:26 +10:00
Tom Gowan 7950045240 minor fixes 2019-07-05 05:51:26 +10:00
Tom Gowan 062205160c remove build.bat 2019-07-05 05:51:26 +10:00
Tom Gowan 25070464f9 git ignore, temp files, fetch_add, os cfg 2019-07-05 05:51:26 +10:00
Tom Gowan 616974353b opt in and bug fix 2019-07-05 05:51:26 +10:00
Tom Gowan 72c5e9a8c1 asio sys lib comments and rust fmt 2019-07-05 05:51:25 +10:00
Tom Gowan f6d1a74be2 asio sys lib comments and rust fmt 2019-07-05 05:51:25 +10:00
Tom Gowan ffcbc02e52 multi channels 2019-07-05 05:51:25 +10:00
Tom Gowan 6e0eb073d1 sample rate support 2019-07-05 05:51:25 +10:00
Tom Gowan 5ec6da3aad Fixed driver bug 2019-07-05 05:51:24 +10:00
Tom Gowan ed50bb9923 adding outputs 2019-07-05 05:51:24 +10:00
Tom Gowan ff7fd62a2d clean up 2019-07-05 05:51:24 +10:00
Tom Gowan 8193bc9f79 sharing asio streams 2019-07-05 05:51:24 +10:00
Tom Gowan 76eb07a274 Multiple streams 2019-07-05 05:51:23 +10:00
Tom Gowan c24fa62028 error handling 2019-07-05 05:51:23 +10:00
Tom Gowan ec172bbc47 error wrappers 2019-07-05 05:51:23 +10:00
Tom Gowan 4ba291e8be multi channel support 2019-07-05 05:51:23 +10:00
Tom Gowan 2ef7008615 Keep driver alive 2019-07-05 05:51:23 +10:00
Tom Gowan ae7a03d788 Device rewrite Fixes #1 Fixes #12 2019-07-05 05:51:23 +10:00
Tom Gowan 9c355f5579 fixed buffer 2019-07-05 05:51:22 +10:00
DMSDeveloper a1740a9282 record wav working v1 2019-07-05 05:51:21 +10:00
DMSDeveloper fe4d108477 minor fixes 2019-07-05 05:51:21 +10:00
DMSDeveloper 2cfd60757a working on windows 2019-07-05 05:51:21 +10:00
Tom Gowan 49968f4b82 change of branch 2019-07-05 05:51:21 +10:00