We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d0411a commit f3de53fCopy full SHA for f3de53f
examples/asio_panel.rs
@@ -1,9 +1,9 @@
1
-use cpal::platform::DeviceInner;
2
-use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
3
-use cpal::HostId;
4
-
5
-#[cfg(target_os = "windows")]
+#[cfg(all(windows, feature = "asio"))]
6
fn main() -> anyhow::Result<()> {
+ use cpal::platform::DeviceInner;
+ use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
+ use cpal::HostId;
+
7
let host = cpal::host_from_id(HostId::Asio)?;
8
9
let device = host
@@ -42,5 +42,5 @@ fn main() -> anyhow::Result<()> {
42
Ok(())
43
}
44
45
-#[cfg(not(target_os = "windows"))]
+#[cfg(not(all(windows, feature = "asio")))]
46
fn main() {}
0 commit comments