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))]
33unsafe impl NSObjectProtocol for AVAudioUnitTimePitch {}
34
35#[cfg(all(
36 feature = "AVAudioNode",
37 feature = "AVAudioUnit",
38 feature = "AVAudioUnitTimeEffect"
39))]
40impl AVAudioUnitTimePitch {
41 extern_methods!(
42 #[unsafe(method(rate))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn rate(&self) -> c_float;
50
51 #[unsafe(method(setRate:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setRate(&self, rate: c_float);
55
56 #[unsafe(method(pitch))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn pitch(&self) -> c_float;
67
68 #[unsafe(method(setPitch:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn setPitch(&self, pitch: c_float);
72
73 #[unsafe(method(overlap))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn overlap(&self) -> c_float;
84
85 #[unsafe(method(setOverlap:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setOverlap(&self, overlap: c_float);
89 );
90}
91
92#[cfg(all(
94 feature = "AVAudioNode",
95 feature = "AVAudioUnit",
96 feature = "AVAudioUnitTimeEffect"
97))]
98impl AVAudioUnitTimePitch {
99 extern_methods!(
100 #[cfg(feature = "objc2-audio-toolbox")]
101 #[cfg(not(target_os = "watchos"))]
102 #[unsafe(method(initWithAudioComponentDescription:))]
109 #[unsafe(method_family = init)]
110 pub unsafe fn initWithAudioComponentDescription(
111 this: Allocated<Self>,
112 audio_component_description: AudioComponentDescription,
113 ) -> Retained<Self>;
114 );
115}
116
117#[cfg(all(
119 feature = "AVAudioNode",
120 feature = "AVAudioUnit",
121 feature = "AVAudioUnitTimeEffect"
122))]
123impl AVAudioUnitTimePitch {
124 extern_methods!(
125 #[unsafe(method(init))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128
129 #[unsafe(method(new))]
130 #[unsafe(method_family = new)]
131 pub unsafe fn new() -> Retained<Self>;
132 );
133}