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::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioUnitReverbPreset(pub NSInteger);
impl AVAudioUnitReverbPreset {
#[doc(alias = "AVAudioUnitReverbPresetSmallRoom")]
pub const SmallRoom: Self = Self(0);
#[doc(alias = "AVAudioUnitReverbPresetMediumRoom")]
pub const MediumRoom: Self = Self(1);
#[doc(alias = "AVAudioUnitReverbPresetLargeRoom")]
pub const LargeRoom: Self = Self(2);
#[doc(alias = "AVAudioUnitReverbPresetMediumHall")]
pub const MediumHall: Self = Self(3);
#[doc(alias = "AVAudioUnitReverbPresetLargeHall")]
pub const LargeHall: Self = Self(4);
#[doc(alias = "AVAudioUnitReverbPresetPlate")]
pub const Plate: Self = Self(5);
#[doc(alias = "AVAudioUnitReverbPresetMediumChamber")]
pub const MediumChamber: Self = Self(6);
#[doc(alias = "AVAudioUnitReverbPresetLargeChamber")]
pub const LargeChamber: Self = Self(7);
#[doc(alias = "AVAudioUnitReverbPresetCathedral")]
pub const Cathedral: Self = Self(8);
#[doc(alias = "AVAudioUnitReverbPresetLargeRoom2")]
pub const LargeRoom2: Self = Self(9);
#[doc(alias = "AVAudioUnitReverbPresetMediumHall2")]
pub const MediumHall2: Self = Self(10);
#[doc(alias = "AVAudioUnitReverbPresetMediumHall3")]
pub const MediumHall3: Self = Self(11);
#[doc(alias = "AVAudioUnitReverbPresetLargeHall2")]
pub const LargeHall2: Self = Self(12);
}
unsafe impl Encode for AVAudioUnitReverbPreset {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioUnitReverbPreset {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(AVAudioUnitEffect, AVAudioUnit, AVAudioNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
pub struct AVAudioUnitReverb;
);
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioUnitReverb {}
);
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitReverb {
extern_methods!(
#[unsafe(method(loadFactoryPreset:))]
#[unsafe(method_family = none)]
pub unsafe fn loadFactoryPreset(&self, preset: AVAudioUnitReverbPreset);
#[unsafe(method(wetDryMix))]
#[unsafe(method_family = none)]
pub unsafe fn wetDryMix(&self) -> c_float;
#[unsafe(method(setWetDryMix:))]
#[unsafe(method_family = none)]
pub unsafe fn setWetDryMix(&self, wet_dry_mix: c_float);
);
}
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitReverb {
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>;
);
}
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitReverb {
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>;
);
}