1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
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::*;
extern_class!(
/// an AVAudioUnit that processes audio in real-time
///
/// An AVAudioUnitEffect represents an audio unit of type kAudioUnitType_Effect,
/// kAudioUnitType_MusicEffect, kAudioUnitType_Panner, kAudioUnitType_RemoteEffect or
/// kAudioUnitType_RemoteMusicEffect.
///
/// These effects run in real-time and process some x number of audio input
/// samples to produce x number of audio output samples. A delay unit is an
/// example of an effect unit.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiouniteffect?language=objc)
#[unsafe(super(AVAudioUnit, AVAudioNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
pub struct AVAudioUnitEffect;
);
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioUnitEffect {}
);
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
impl AVAudioUnitEffect {
extern_methods!(
#[cfg(feature = "objc2-audio-toolbox")]
#[cfg(not(target_os = "watchos"))]
/// Create an AVAudioUnitEffect object.
///
///
/// Parameter `audioComponentDescription`: AudioComponentDescription of the audio unit to be instantiated.
///
/// The componentType must be one of these types
/// kAudioUnitType_Effect
/// kAudioUnitType_MusicEffect
/// kAudioUnitType_Panner
/// kAudioUnitType_RemoteEffect
/// kAudioUnitType_RemoteMusicEffect
#[unsafe(method(initWithAudioComponentDescription:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAudioComponentDescription(
this: Allocated<Self>,
audio_component_description: AudioComponentDescription,
) -> Retained<Self>;
/// Bypass state of the audio unit.
#[unsafe(method(bypass))]
#[unsafe(method_family = none)]
pub unsafe fn bypass(&self) -> bool;
/// Setter for [`bypass`][Self::bypass].
#[unsafe(method(setBypass:))]
#[unsafe(method_family = none)]
pub unsafe fn setBypass(&self, bypass: bool);
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
impl AVAudioUnitEffect {
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>;
);
}