Fix CI failure (#705)
This commit is contained in:
parent
85d773d59f
commit
73a035617b
5 changed files with 126 additions and 21 deletions
|
|
@ -12,7 +12,12 @@ use cpal::{FromSample, Sample};
|
|||
#[derive(Debug)]
|
||||
struct Opt {
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
jack: bool,
|
||||
|
|
@ -24,7 +29,12 @@ impl Opt {
|
|||
fn from_args() -> Self {
|
||||
let app = clap::Command::new("beep").arg(arg!([DEVICE] "The audio device to use"));
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
let app = app.arg(arg!(-j --jack "Use the JACK host"));
|
||||
|
|
@ -32,7 +42,12 @@ impl Opt {
|
|||
let device = matches.value_of("DEVICE").unwrap_or("default").to_string();
|
||||
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
return Opt {
|
||||
|
|
@ -41,7 +56,12 @@ impl Opt {
|
|||
};
|
||||
|
||||
#[cfg(any(
|
||||
not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd")),
|
||||
not(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
)),
|
||||
not(feature = "jack")
|
||||
))]
|
||||
Opt { device }
|
||||
|
|
@ -53,7 +73,12 @@ fn main() -> anyhow::Result<()> {
|
|||
|
||||
// Conditionally compile with jack if the feature is specified.
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
// Manually check for flags. Can be passed through cargo with -- e.g.
|
||||
|
|
@ -70,7 +95,12 @@ fn main() -> anyhow::Result<()> {
|
|||
};
|
||||
|
||||
#[cfg(any(
|
||||
not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd")),
|
||||
not(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
)),
|
||||
not(feature = "jack")
|
||||
))]
|
||||
let host = cpal::default_host();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,12 @@ use ringbuf::RingBuffer;
|
|||
#[derive(Debug)]
|
||||
struct Opt {
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
jack: bool,
|
||||
|
|
@ -38,7 +43,12 @@ impl Opt {
|
|||
.arg(arg!([OUT] "The output audio device to use"));
|
||||
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
let app = app.arg(arg!(-j --jack "Use the JACK host"));
|
||||
|
|
@ -52,7 +62,12 @@ impl Opt {
|
|||
let output_device = matches.value_of("OUT").unwrap_or("default").to_string();
|
||||
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
return Ok(Opt {
|
||||
|
|
@ -63,7 +78,12 @@ impl Opt {
|
|||
});
|
||||
|
||||
#[cfg(any(
|
||||
not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd")),
|
||||
not(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
)),
|
||||
not(feature = "jack")
|
||||
))]
|
||||
Ok(Opt {
|
||||
|
|
@ -79,7 +99,12 @@ fn main() -> anyhow::Result<()> {
|
|||
|
||||
// Conditionally compile with jack if the feature is specified.
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
// Manually check for flags. Can be passed through cargo with -- e.g.
|
||||
|
|
@ -96,7 +121,12 @@ fn main() -> anyhow::Result<()> {
|
|||
};
|
||||
|
||||
#[cfg(any(
|
||||
not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd")),
|
||||
not(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
)),
|
||||
not(feature = "jack")
|
||||
))]
|
||||
let host = cpal::default_host();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ use std::sync::{Arc, Mutex};
|
|||
#[derive(Debug)]
|
||||
struct Opt {
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
jack: bool,
|
||||
|
|
@ -29,7 +34,12 @@ impl Opt {
|
|||
fn from_args() -> Self {
|
||||
let app = clap::Command::new("record_wav").arg(arg!([DEVICE] "The audio device to use"));
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
let app = app.arg(arg!(-j --jack "Use the JACK host"));
|
||||
|
|
@ -37,7 +47,12 @@ impl Opt {
|
|||
let device = matches.value_of("DEVICE").unwrap_or("default").to_string();
|
||||
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
return Opt {
|
||||
|
|
@ -46,7 +61,12 @@ impl Opt {
|
|||
};
|
||||
|
||||
#[cfg(any(
|
||||
not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd")),
|
||||
not(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
)),
|
||||
not(feature = "jack")
|
||||
))]
|
||||
Opt { device }
|
||||
|
|
@ -58,7 +78,12 @@ fn main() -> Result<(), anyhow::Error> {
|
|||
|
||||
// Conditionally compile with jack if the feature is specified.
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd"),
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
),
|
||||
feature = "jack"
|
||||
))]
|
||||
// Manually check for flags. Can be passed through cargo with -- e.g.
|
||||
|
|
@ -75,7 +100,12 @@ fn main() -> Result<(), anyhow::Error> {
|
|||
};
|
||||
|
||||
#[cfg(any(
|
||||
not(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd")),
|
||||
not(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd"
|
||||
)),
|
||||
not(feature = "jack")
|
||||
))]
|
||||
let host = cpal::default_host();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue