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))]
32extern_conformance!(
33 unsafe impl AVAudio3DMixing for AVAudioUnitGenerator {}
34);
35
36#[cfg(all(
37 feature = "AVAudioMixing",
38 feature = "AVAudioNode",
39 feature = "AVAudioUnit"
40))]
41extern_conformance!(
42 unsafe impl AVAudioMixing for AVAudioUnitGenerator {}
43);
44
45#[cfg(all(
46 feature = "AVAudioMixing",
47 feature = "AVAudioNode",
48 feature = "AVAudioUnit"
49))]
50extern_conformance!(
51 unsafe impl AVAudioStereoMixing for AVAudioUnitGenerator {}
52);
53
54#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
55extern_conformance!(
56 unsafe impl NSObjectProtocol for AVAudioUnitGenerator {}
57);
58
59#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
60impl AVAudioUnitGenerator {
61 extern_methods!(
62 #[cfg(feature = "objc2-audio-toolbox")]
63 #[cfg(not(target_os = "watchos"))]
64 #[unsafe(method(initWithAudioComponentDescription:))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn initWithAudioComponentDescription(
73 this: Allocated<Self>,
74 audio_component_description: AudioComponentDescription,
75 ) -> Retained<Self>;
76
77 #[unsafe(method(bypass))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn bypass(&self) -> bool;
81
82 #[unsafe(method(setBypass:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn setBypass(&self, bypass: bool);
86 );
87}
88
89#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
91impl AVAudioUnitGenerator {
92 extern_methods!(
93 #[unsafe(method(init))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
96
97 #[unsafe(method(new))]
98 #[unsafe(method_family = new)]
99 pub unsafe fn new() -> Retained<Self>;
100 );
101}