Skip to content

Commit

Permalink
AudioToolbox/AudioUnit.h
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenehp committed Jun 6, 2024
1 parent 34434c4 commit dd3e2dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ fn build(sdk_path: Option<&str>, target: &str) {
// Since iOS 10.0, macOS 10.12, visionOS 1.0, all the functionality in AudioUnit
// moved to AudioToolbox, and the AudioUnit headers have been simple
// wrappers ever since.
if target.contains("apple-ios"){
if target.contains("apple-ios") || target.contains("apple-visionos"){
// On iOS, the AudioUnit framework does not have (and never had) an
// actual dylib to link to, it is just a few header files.
// The AudioToolbox framework contains the symbols instead.
println!("cargo:rustc-link-lib=framework=AudioToolbox");
// headers.push("AudioToolbox/AudioUnit.h");
headers.push("AudioToolbox/AudioUnit.h");
} else {
// On macOS, the symbols are present in the AudioToolbox framework,
// but only on macOS 10.12 and above.
Expand All @@ -74,9 +74,9 @@ fn build(sdk_path: Option<&str>, target: &str) {
// contains a dylib with the desired symbols, that we can link to
// (in later versions just re-exports from AudioToolbox).
println!("cargo:rustc-link-lib=framework=AudioUnit");
// headers.push("AudioUnit/AudioUnit.h");
headers.push("AudioUnit/AudioUnit.h");
}
headers.push("AudioUnit/AudioUnit.h");
// headers.push("AudioUnit/AudioUnit.h");
}

#[cfg(feature = "audio_toolbox")]
Expand Down

0 comments on commit dd3e2dd

Please sign in to comment.