objc2_avf_audio/generated/
AVAudioUnitTimePitch.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
12extern_class!(
13 #[unsafe(super(AVAudioUnitTimeEffect, AVAudioUnit, AVAudioNode, NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(all(
21 feature = "AVAudioNode",
22 feature = "AVAudioUnit",
23 feature = "AVAudioUnitTimeEffect"
24 ))]
25 pub struct AVAudioUnitTimePitch;
26);
27
28#[cfg(all(
29 feature = "AVAudioNode",
30 feature = "AVAudioUnit",
31 feature = "AVAudioUnitTimeEffect"
32))]
33extern_conformance!(
34 unsafe impl NSObjectProtocol for AVAudioUnitTimePitch {}
35);
36
37#[cfg(all(
38 feature = "AVAudioNode",
39 feature = "AVAudioUnit",
40 feature = "AVAudioUnitTimeEffect"
41))]
42impl AVAudioUnitTimePitch {
43 extern_methods!(
44 #[unsafe(method(rate))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn rate(&self) -> c_float;
52
53 #[unsafe(method(setRate:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setRate(&self, rate: c_float);
57
58 #[unsafe(method(pitch))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn pitch(&self) -> c_float;
69
70 #[unsafe(method(setPitch:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setPitch(&self, pitch: c_float);
74
75 #[unsafe(method(overlap))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn overlap(&self) -> c_float;
86
87 #[unsafe(method(setOverlap:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setOverlap(&self, overlap: c_float);
91 );
92}
93
94#[cfg(all(
96 feature = "AVAudioNode",
97 feature = "AVAudioUnit",
98 feature = "AVAudioUnitTimeEffect"
99))]
100impl AVAudioUnitTimePitch {
101 extern_methods!(
102 #[cfg(feature = "objc2-audio-toolbox")]
103 #[cfg(not(target_os = "watchos"))]
104 #[unsafe(method(initWithAudioComponentDescription:))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn initWithAudioComponentDescription(
113 this: Allocated<Self>,
114 audio_component_description: AudioComponentDescription,
115 ) -> Retained<Self>;
116 );
117}
118
119#[cfg(all(
121 feature = "AVAudioNode",
122 feature = "AVAudioUnit",
123 feature = "AVAudioUnitTimeEffect"
124))]
125impl AVAudioUnitTimePitch {
126 extern_methods!(
127 #[unsafe(method(init))]
128 #[unsafe(method_family = init)]
129 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
130
131 #[unsafe(method(new))]
132 #[unsafe(method_family = new)]
133 pub unsafe fn new() -> Retained<Self>;
134 );
135}