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))]
77extern_conformance!(
78 unsafe impl NSObjectProtocol for AVAudioUnitReverb {}
79);
80
81#[cfg(all(
82 feature = "AVAudioNode",
83 feature = "AVAudioUnit",
84 feature = "AVAudioUnitEffect"
85))]
86impl AVAudioUnitReverb {
87 extern_methods!(
88 #[unsafe(method(loadFactoryPreset:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn loadFactoryPreset(&self, preset: AVAudioUnitReverbPreset);
93
94 #[unsafe(method(wetDryMix))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn wetDryMix(&self) -> c_float;
100
101 #[unsafe(method(setWetDryMix:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn setWetDryMix(&self, wet_dry_mix: c_float);
105 );
106}
107
108#[cfg(all(
110 feature = "AVAudioNode",
111 feature = "AVAudioUnit",
112 feature = "AVAudioUnitEffect"
113))]
114impl AVAudioUnitReverb {
115 extern_methods!(
116 #[cfg(feature = "objc2-audio-toolbox")]
117 #[cfg(not(target_os = "watchos"))]
118 #[unsafe(method(initWithAudioComponentDescription:))]
130 #[unsafe(method_family = init)]
131 pub unsafe fn initWithAudioComponentDescription(
132 this: Allocated<Self>,
133 audio_component_description: AudioComponentDescription,
134 ) -> Retained<Self>;
135 );
136}
137
138#[cfg(all(
140 feature = "AVAudioNode",
141 feature = "AVAudioUnit",
142 feature = "AVAudioUnitEffect"
143))]
144impl AVAudioUnitReverb {
145 extern_methods!(
146 #[unsafe(method(init))]
147 #[unsafe(method_family = init)]
148 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
149
150 #[unsafe(method(new))]
151 #[unsafe(method_family = new)]
152 pub unsafe fn new() -> Retained<Self>;
153 );
154}