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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
//! 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 objc2_foundation::*;
use crate::*;
extern_class!(
/// an AVAudioUnitEffect that implements a delay effect
///
/// A delay unit delays the input signal by the specified time interval
/// and then blends it with the input signal. The amount of high frequency
/// roll-off can also be controlled in order to simulate the effect of
/// a tape delay.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiounitdelay?language=objc)
#[unsafe(super(AVAudioUnitEffect, AVAudioUnit, AVAudioNode, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
pub struct AVAudioUnitDelay;
);
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioUnitDelay {}
);
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitDelay {
extern_methods!(
/// Time taken by the delayed input signal to reach the output
///
/// Range: 0 -> 2
/// Default: 1
/// Unit: Seconds
#[unsafe(method(delayTime))]
#[unsafe(method_family = none)]
pub unsafe fn delayTime(&self) -> NSTimeInterval;
/// Setter for [`delayTime`][Self::delayTime].
#[unsafe(method(setDelayTime:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelayTime(&self, delay_time: NSTimeInterval);
/// Amount of the output signal fed back into the delay line
/// Range: -100 -> 100
/// Default: 50
/// Unit: Percent
#[unsafe(method(feedback))]
#[unsafe(method_family = none)]
pub unsafe fn feedback(&self) -> c_float;
/// Setter for [`feedback`][Self::feedback].
#[unsafe(method(setFeedback:))]
#[unsafe(method_family = none)]
pub unsafe fn setFeedback(&self, feedback: c_float);
/// Cutoff frequency above which high frequency content is rolled off
/// Range: 10 -> (samplerate/2)
/// Default: 15000
/// Unit: Hertz
#[unsafe(method(lowPassCutoff))]
#[unsafe(method_family = none)]
pub unsafe fn lowPassCutoff(&self) -> c_float;
/// Setter for [`lowPassCutoff`][Self::lowPassCutoff].
#[unsafe(method(setLowPassCutoff:))]
#[unsafe(method_family = none)]
pub unsafe fn setLowPassCutoff(&self, low_pass_cutoff: c_float);
/// Blend of the wet and dry signals
/// Range: 0 (all dry) -> 100 (all wet)
/// Default: 100
/// Unit: Percent
#[unsafe(method(wetDryMix))]
#[unsafe(method_family = none)]
pub unsafe fn wetDryMix(&self) -> c_float;
/// Setter for [`wetDryMix`][Self::wetDryMix].
#[unsafe(method(setWetDryMix:))]
#[unsafe(method_family = none)]
pub unsafe fn setWetDryMix(&self, wet_dry_mix: c_float);
);
}
/// Methods declared on superclass `AVAudioUnitEffect`.
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitDelay {
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>;
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(all(
feature = "AVAudioNode",
feature = "AVAudioUnit",
feature = "AVAudioUnitEffect"
))]
impl AVAudioUnitDelay {
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>;
);
}