Skip to content

Commit

Permalink
Fix missing linkage to macOS CoreFoundation
Browse files Browse the repository at this point in the history
  • Loading branch information
skywhale committed Nov 23, 2023
1 parent 751c0bf commit 6e23717
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ name = "recording"
required-features = ["derive_serde"]

[dev-dependencies]
anyhow = "1"
crossbeam-channel = "0.5"
ctrlc = { version = "3", features = ["termination"] }
failure = "0.1"
hound = "3.4"
json5 = "0.3"
hound = "3"
json5 = "0.4"
portaudio = "0.7"
regex = "1"
serde = { version = "1", features = ["derive"]}
Expand Down
2 changes: 1 addition & 1 deletion examples/karaoke.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This example loops the microphone input back to the speakers, while applying echo cancellation,
// creating an experience similar to Karaoke microphones. It uses PortAudio as an interface to the
// underlying audio devices.
use anyhow::Error;
use ctrlc;
use failure::Error;
use portaudio;
use std::{
sync::{
Expand Down
4 changes: 2 additions & 2 deletions examples/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// $ cargo run --example recording --features bundled --features derive_serde -- --config-file \
/// examples/recording-configs/record-pipeline.json5
/// ```
use failure::{format_err, Error};
use anyhow::{anyhow, Error};
use hound::{WavIntoSamples, WavReader, WavWriter};
use regex::Regex;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -96,7 +96,7 @@ fn match_device(
return Ok(device.0);
}
}
Err(format_err!("Audio device matching \"{}\" not found.", device_name))
Err(anyhow!("Audio device matching \"{}\" not found.", device_name))
}

fn create_stream_settings(
Expand Down
6 changes: 4 additions & 2 deletions webrtc-audio-processing-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ fn main() -> Result<(), Error> {
}

if cfg!(target_os = "macos") {
// TODO: Remove after confirming this is not necessary.
//println!("cargo:rustc-link-lib=dylib=c++");
//println!("cargo:rustc-link-lib=framework=CoreFoundation");
println!("cargo:rustc-link-lib=framework=CoreFoundation");
} else {
println!("cargo:rustc-link-lib=dylib=stdc++");
// TODO: Remove after confirming this is not necessary.
//println!("cargo:rustc-link-lib=dylib=stdc++");
}

cc::Build::new()
Expand Down

0 comments on commit 6e23717

Please sign in to comment.