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 AVAudioUnitDistortionPreset(pub NSInteger);
impl AVAudioUnitDistortionPreset {
#[doc(alias = "AVAudioUnitDistortionPresetDrumsBitBrush")]
pub const DrumsBitBrush: Self = Self(0);
#[doc(alias = "AVAudioUnitDistortionPresetDrumsBufferBeats")]
pub const DrumsBufferBeats: Self = Self(1);
#[doc(alias = "AVAudioUnitDistortionPresetDrumsLoFi")]
pub const DrumsLoFi: Self = Self(2);
#[doc(alias = "AVAudioUnitDistortionPresetMultiBrokenSpeaker")]
pub const MultiBrokenSpeaker: Self = Self(3);
#[doc(alias = "AVAudioUnitDistortionPresetMultiCellphoneConcert")]
pub const MultiCellphoneConcert: Self = Self(4);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDecimated1")]
pub const MultiDecimated1: Self = Self(5);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDecimated2")]
pub const MultiDecimated2: Self = Self(6);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDecimated3")]
pub const MultiDecimated3: Self = Self(7);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDecimated4")]
pub const MultiDecimated4: Self = Self(8);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDistortedFunk")]
pub const MultiDistortedFunk: Self = Self(9);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDistortedCubed")]
pub const MultiDistortedCubed: Self = Self(10);
#[doc(alias = "AVAudioUnitDistortionPresetMultiDistortedSquared")]
pub const MultiDistortedSquared: Self = Self(11);
#[doc(alias = "AVAudioUnitDistortionPresetMultiEcho1")]
pub const MultiEcho1: Self = Self(12);
#[doc(alias = "AVAudioUnitDistortionPresetMultiEcho2")]
pub const MultiEcho2: Self = Self(13);
#[doc(alias = "AVAudioUnitDistortionPresetMultiEchoTight1")]
pub const MultiEchoTight1: Self = Self(14);
#[doc(alias = "AVAudioUnitDistortionPresetMultiEchoTight2")]
pub const MultiEchoTight2: Self = Self(15);
#[doc(alias = "AVAudioUnitDistortionPresetMultiEverythingIsBroken")]
pub const MultiEverythingIsBroken: Self = Self(16);
#[doc(alias = "AVAudioUnitDistortionPresetSpeechAlienChatter")]
pub const SpeechAlienChatter: Self = Self(17);
#[doc(alias = "AVAudioUnitDistortionPresetSpeechCosmicInterference")]
pub const SpeechCosmicInterference: Self = Self(18);
#[doc(alias = "AVAudioUnitDistortionPresetSpeechGoldenPi")]
pub const SpeechGoldenPi: Self = Self(19);
#[doc(alias = "AVAudioUnitDistortionPresetSpeechRadioTower")]
pub const SpeechRadioTower: Self = Self(20);
#[doc(alias = "AVAudioUnitDistortionPresetSpeechWaves")]
pub const SpeechWaves: Self = Self(21);
}
unsafe impl Encode for AVAudioUnitDistortionPreset {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioUnitDistortionPreset {
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 AVAudioUnitDistortion;
);
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioUnitDistortion {}
);
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitDistortion {
extern_methods!(
#[unsafe(method(loadFactoryPreset:))]
#[unsafe(method_family = none)]
pub unsafe fn loadFactoryPreset(&self, preset: AVAudioUnitDistortionPreset);
#[unsafe(method(preGain))]
#[unsafe(method_family = none)]
pub unsafe fn preGain(&self) -> c_float;
#[unsafe(method(setPreGain:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreGain(&self, pre_gain: c_float);
#[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 AVAudioUnitDistortion {
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 AVAudioUnitDistortion {
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>;
);
}