use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-audio-toolbox")]
#[cfg(not(target_os = "watchos"))]
use objc2_audio_toolbox::*;
use crate::*;
extern_class!(
#[unsafe(super(AVAudioUnit, AVAudioNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
pub struct AVAudioUnitGenerator;
);
#[cfg(all(
feature = "AVAudioMixing",
feature = "AVAudioNode",
feature = "AVAudioUnit"
))]
extern_conformance!(
unsafe impl AVAudio3DMixing for AVAudioUnitGenerator {}
);
#[cfg(all(
feature = "AVAudioMixing",
feature = "AVAudioNode",
feature = "AVAudioUnit"
))]
extern_conformance!(
unsafe impl AVAudioMixing for AVAudioUnitGenerator {}
);
#[cfg(all(
feature = "AVAudioMixing",
feature = "AVAudioNode",
feature = "AVAudioUnit"
))]
extern_conformance!(
unsafe impl AVAudioStereoMixing for AVAudioUnitGenerator {}
);
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioUnitGenerator {}
);
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
impl AVAudioUnitGenerator {
extern_methods!(
#[cfg(feature = "objc2-audio-toolbox")]
#[cfg(not(target_os = "watchos"))]
#[unsafe(method(initWithAudioComponentDescription:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAudioComponentDescription(
this: Allocated<Self>,
audio_component_description: AudioComponentDescription,
) -> Retained<Self>;
#[unsafe(method(bypass))]
#[unsafe(method_family = none)]
pub unsafe fn bypass(&self) -> bool;
#[unsafe(method(setBypass:))]
#[unsafe(method_family = none)]
pub unsafe fn setBypass(&self, bypass: bool);
);
}
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
impl AVAudioUnitGenerator {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}