objc2_avf_audio/generated/
AVAudioUnitReverb.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
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct AVAudioUnitReverbPreset(pub NSInteger);
17impl AVAudioUnitReverbPreset {
18 #[doc(alias = "AVAudioUnitReverbPresetSmallRoom")]
19 pub const SmallRoom: Self = Self(0);
20 #[doc(alias = "AVAudioUnitReverbPresetMediumRoom")]
21 pub const MediumRoom: Self = Self(1);
22 #[doc(alias = "AVAudioUnitReverbPresetLargeRoom")]
23 pub const LargeRoom: Self = Self(2);
24 #[doc(alias = "AVAudioUnitReverbPresetMediumHall")]
25 pub const MediumHall: Self = Self(3);
26 #[doc(alias = "AVAudioUnitReverbPresetLargeHall")]
27 pub const LargeHall: Self = Self(4);
28 #[doc(alias = "AVAudioUnitReverbPresetPlate")]
29 pub const Plate: Self = Self(5);
30 #[doc(alias = "AVAudioUnitReverbPresetMediumChamber")]
31 pub const MediumChamber: Self = Self(6);
32 #[doc(alias = "AVAudioUnitReverbPresetLargeChamber")]
33 pub const LargeChamber: Self = Self(7);
34 #[doc(alias = "AVAudioUnitReverbPresetCathedral")]
35 pub const Cathedral: Self = Self(8);
36 #[doc(alias = "AVAudioUnitReverbPresetLargeRoom2")]
37 pub const LargeRoom2: Self = Self(9);
38 #[doc(alias = "AVAudioUnitReverbPresetMediumHall2")]
39 pub const MediumHall2: Self = Self(10);
40 #[doc(alias = "AVAudioUnitReverbPresetMediumHall3")]
41 pub const MediumHall3: Self = Self(11);
42 #[doc(alias = "AVAudioUnitReverbPresetLargeHall2")]
43 pub const LargeHall2: Self = Self(12);
44}
45
46unsafe impl Encode for AVAudioUnitReverbPreset {
47 const ENCODING: Encoding = NSInteger::ENCODING;
48}
49
50unsafe impl RefEncode for AVAudioUnitReverbPreset {
51 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
52}
53
54extern_class!(
55 #[unsafe(super(AVAudioUnitEffect, AVAudioUnit, AVAudioNode, NSObject))]
63 #[derive(Debug, PartialEq, Eq, Hash)]
64 #[cfg(all(
65 feature = "AVAudioNode",
66 feature = "AVAudioUnit",
67 feature = "AVAudioUnitEffect"
68 ))]
69 pub struct AVAudioUnitReverb;
70);
71
72#[cfg(all(
73 feature = "AVAudioNode",
74 feature = "AVAudioUnit",
75 feature = "AVAudioUnitEffect"
76))]
77unsafe impl NSObjectProtocol for AVAudioUnitReverb {}
78
79#[cfg(all(
80 feature = "AVAudioNode",
81 feature = "AVAudioUnit",
82 feature = "AVAudioUnitEffect"
83))]
84impl AVAudioUnitReverb {
85 extern_methods!(
86 #[unsafe(method(loadFactoryPreset:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn loadFactoryPreset(&self, preset: AVAudioUnitReverbPreset);
91
92 #[unsafe(method(wetDryMix))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn wetDryMix(&self) -> c_float;
98
99 #[unsafe(method(setWetDryMix:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setWetDryMix(&self, wet_dry_mix: c_float);
103 );
104}
105
106#[cfg(all(
108 feature = "AVAudioNode",
109 feature = "AVAudioUnit",
110 feature = "AVAudioUnitEffect"
111))]
112impl AVAudioUnitReverb {
113 extern_methods!(
114 #[cfg(feature = "objc2-audio-toolbox")]
115 #[cfg(not(target_os = "watchos"))]
116 #[unsafe(method(initWithAudioComponentDescription:))]
128 #[unsafe(method_family = init)]
129 pub unsafe fn initWithAudioComponentDescription(
130 this: Allocated<Self>,
131 audio_component_description: AudioComponentDescription,
132 ) -> Retained<Self>;
133 );
134}
135
136#[cfg(all(
138 feature = "AVAudioNode",
139 feature = "AVAudioUnit",
140 feature = "AVAudioUnitEffect"
141))]
142impl AVAudioUnitReverb {
143 extern_methods!(
144 #[unsafe(method(init))]
145 #[unsafe(method_family = init)]
146 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
147
148 #[unsafe(method(new))]
149 #[unsafe(method_family = new)]
150 pub unsafe fn new() -> Retained<Self>;
151 );
152}