Add an Android example and enhance the other examples with CLI argument parsing.

This commit is contained in:
Alex Moon 2020-12-14 10:56:14 -07:00
parent f6c12257bb
commit 269c60fde0
7 changed files with 222 additions and 53 deletions

View file

@ -18,6 +18,7 @@ thiserror = "1.0.2"
anyhow = "1.0.12"
hound = "3.4"
ringbuf = "0.2"
structopt = "0.3.21"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["audiosessiontypes", "audioclient", "coml2api", "combaseapi", "debug", "devpkey", "handleapi", "ksmedia", "mmdeviceapi", "objbase", "profileapi", "std", "synchapi", "winbase", "winuser"] }
@ -52,22 +53,27 @@ ndk = "0.2"
ndk-glue = "0.2"
jni = "0.17"
[[example]]
name = "android"
path = "examples/android.rs"
crate-type = ["cdylib"]
[[example]]
name = "beep"
path = "examples/beep.rs"
crate-type = ["cdylib"]
crate-type = ["bin"]
[[example]]
name = "enumerate"
path = "examples/enumerate.rs"
crate-type = ["cdylib"]
crate-type = ["bin"]
[[example]]
name = "feedback"
path = "examples/feedback.rs"
crate-type = ["cdylib"]
crate-type = ["bin"]
[[example]]
name = "record_wav"
path = "examples/record_wav.rs"
crate-type = ["cdylib"]
crate-type = ["bin"]