objc2_avf_audio/generated/
AVAudioUnitGenerator.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-audio-toolbox")]
7#[cfg(not(target_os = "watchos"))]
8use objc2_audio_toolbox::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(AVAudioUnit, AVAudioNode, NSObject))]
22 #[derive(Debug, PartialEq, Eq, Hash)]
23 #[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
24 pub struct AVAudioUnitGenerator;
25);
26
27#[cfg(all(
28 feature = "AVAudioMixing",
29 feature = "AVAudioNode",
30 feature = "AVAudioUnit"
31))]
32unsafe impl AVAudio3DMixing for AVAudioUnitGenerator {}
33
34#[cfg(all(
35 feature = "AVAudioMixing",
36 feature = "AVAudioNode",
37 feature = "AVAudioUnit"
38))]
39unsafe impl AVAudioMixing for AVAudioUnitGenerator {}
40
41#[cfg(all(
42 feature = "AVAudioMixing",
43 feature = "AVAudioNode",
44 feature = "AVAudioUnit"
45))]
46unsafe impl AVAudioStereoMixing for AVAudioUnitGenerator {}
47
48#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
49unsafe impl NSObjectProtocol for AVAudioUnitGenerator {}
50
51#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
52impl AVAudioUnitGenerator {
53 extern_methods!(
54 #[cfg(feature = "objc2-audio-toolbox")]
55 #[cfg(not(target_os = "watchos"))]
56 #[unsafe(method(initWithAudioComponentDescription:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithAudioComponentDescription(
65 this: Allocated<Self>,
66 audio_component_description: AudioComponentDescription,
67 ) -> Retained<Self>;
68
69 #[unsafe(method(bypass))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn bypass(&self) -> bool;
73
74 #[unsafe(method(setBypass:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn setBypass(&self, bypass: bool);
78 );
79}
80
81#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
83impl AVAudioUnitGenerator {
84 extern_methods!(
85 #[unsafe(method(init))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89 #[unsafe(method(new))]
90 #[unsafe(method_family = new)]
91 pub unsafe fn new() -> Retained<Self>;
92 );
93}