Skip to content

Commit

Permalink
Tune core_audio feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Oct 29, 2024
1 parent 812ca88 commit 3ecde5a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cidre/src/core_audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ mod hardware_base;
pub use hardware_base::*;

mod hardware;

#[cfg(all(feature = "blocks", feature = "dispatch"))]
pub use hardware::AudioObjPropListenerBlock;
pub use hardware::AudioObjPropListenerFn;
10 changes: 9 additions & 1 deletion cidre/src/core_audio/hardware.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::ffi::c_void;

use crate::{arc, at::AudioBufListN, blocks, cf, core_audio, dispatch, os};
use crate::{arc, at::AudioBufListN, cf, core_audio, os};

#[cfg(all(feature = "blocks", feature = "dispatch"))]
use crate::{blocks, dispatch};

use super::{
AudioObjId, AudioObjPropAddr, AudioObjPropElement, AudioObjPropScope, AudioObjPropSelector,
Expand All @@ -15,6 +18,7 @@ pub type AudioObjPropListenerFn<T = c_void> = extern "C-unwind" fn(
) -> os::Status;

#[doc(alias = "AudioObjectPropertyListenerBlock")]
#[cfg(all(feature = "blocks", feature = "dispatch"))]
pub type AudioObjPropListenerBlock =
blocks::EscBlock<fn(number_addresses: u32, addresses: *const AudioObjPropAddr)>;

Expand Down Expand Up @@ -223,6 +227,7 @@ impl core_audio::AudioObjId {
}

#[doc(alias = "AudioObjectAddPropertyListenerBlock")]
#[cfg(all(feature = "blocks", feature = "dispatch"))]
pub fn add_prop_listener_block(
&self,
address: &AudioObjPropAddr,
Expand All @@ -235,6 +240,7 @@ impl core_audio::AudioObjId {
}

#[doc(alias = "AudioObjectRemovePropertyListenerBlock")]
#[cfg(all(feature = "blocks", feature = "dispatch"))]
pub fn remove_prop_listener_block(
&self,
address: &AudioObjPropAddr,
Expand Down Expand Up @@ -828,13 +834,15 @@ extern "C-unwind" {
client_data: *mut c_void,
) -> os::Status;

#[cfg(all(feature = "blocks", feature = "dispatch"))]
fn AudioObjectAddPropertyListenerBlock(
objectId: AudioObjId,
address: *const AudioObjPropAddr,
dispatch_queue: Option<&dispatch::Queue>,
listener: *mut AudioObjPropListenerBlock,
) -> os::Status;

#[cfg(all(feature = "blocks", feature = "dispatch"))]
fn AudioObjectRemovePropertyListenerBlock(
objectId: AudioObjId,
address: *const AudioObjPropAddr,
Expand Down

0 comments on commit 3ecde5a

Please sign in to comment.