Skip to content

Commit 6e23717

Browse files
committed
Fix missing linkage to macOS CoreFoundation
1 parent 751c0bf commit 6e23717

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ name = "recording"
2727
required-features = ["derive_serde"]
2828

2929
[dev-dependencies]
30+
anyhow = "1"
3031
crossbeam-channel = "0.5"
3132
ctrlc = { version = "3", features = ["termination"] }
32-
failure = "0.1"
33-
hound = "3.4"
34-
json5 = "0.3"
33+
hound = "3"
34+
json5 = "0.4"
3535
portaudio = "0.7"
3636
regex = "1"
3737
serde = { version = "1", features = ["derive"]}

examples/karaoke.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This example loops the microphone input back to the speakers, while applying echo cancellation,
22
// creating an experience similar to Karaoke microphones. It uses PortAudio as an interface to the
33
// underlying audio devices.
4+
use anyhow::Error;
45
use ctrlc;
5-
use failure::Error;
66
use portaudio;
77
use std::{
88
sync::{

examples/recording.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// $ cargo run --example recording --features bundled --features derive_serde -- --config-file \
2222
/// examples/recording-configs/record-pipeline.json5
2323
/// ```
24-
use failure::{format_err, Error};
24+
use anyhow::{anyhow, Error};
2525
use hound::{WavIntoSamples, WavReader, WavWriter};
2626
use regex::Regex;
2727
use serde::{Deserialize, Serialize};
@@ -96,7 +96,7 @@ fn match_device(
9696
return Ok(device.0);
9797
}
9898
}
99-
Err(format_err!("Audio device matching \"{}\" not found.", device_name))
99+
Err(anyhow!("Audio device matching \"{}\" not found.", device_name))
100100
}
101101

102102
fn create_stream_settings(

webrtc-audio-processing-sys/build.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ fn main() -> Result<(), Error> {
111111
}
112112

113113
if cfg!(target_os = "macos") {
114+
// TODO: Remove after confirming this is not necessary.
114115
//println!("cargo:rustc-link-lib=dylib=c++");
115-
//println!("cargo:rustc-link-lib=framework=CoreFoundation");
116+
println!("cargo:rustc-link-lib=framework=CoreFoundation");
116117
} else {
117-
println!("cargo:rustc-link-lib=dylib=stdc++");
118+
// TODO: Remove after confirming this is not necessary.
119+
//println!("cargo:rustc-link-lib=dylib=stdc++");
118120
}
119121

120122
cc::Build::new()

0 commit comments

Comments
 (0)