objc2_avf_audio/generated/
AVAudioUnitVarispeed.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))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 #[cfg(all(
19 feature = "AVAudioNode",
20 feature = "AVAudioUnit",
21 feature = "AVAudioUnitTimeEffect"
22 ))]
23 pub struct AVAudioUnitVarispeed;
24);
25
26#[cfg(all(
27 feature = "AVAudioNode",
28 feature = "AVAudioUnit",
29 feature = "AVAudioUnitTimeEffect"
30))]
31unsafe impl NSObjectProtocol for AVAudioUnitVarispeed {}
32
33#[cfg(all(
34 feature = "AVAudioNode",
35 feature = "AVAudioUnit",
36 feature = "AVAudioUnitTimeEffect"
37))]
38impl AVAudioUnitVarispeed {
39 extern_methods!(
40 #[unsafe(method(rate))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn rate(&self) -> c_float;
60
61 #[unsafe(method(setRate:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setRate(&self, rate: c_float);
65 );
66}
67
68#[cfg(all(
70 feature = "AVAudioNode",
71 feature = "AVAudioUnit",
72 feature = "AVAudioUnitTimeEffect"
73))]
74impl AVAudioUnitVarispeed {
75 extern_methods!(
76 #[cfg(feature = "objc2-audio-toolbox")]
77 #[cfg(not(target_os = "watchos"))]
78 #[unsafe(method(initWithAudioComponentDescription:))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn initWithAudioComponentDescription(
87 this: Allocated<Self>,
88 audio_component_description: AudioComponentDescription,
89 ) -> Retained<Self>;
90 );
91}
92
93#[cfg(all(
95 feature = "AVAudioNode",
96 feature = "AVAudioUnit",
97 feature = "AVAudioUnitTimeEffect"
98))]
99impl AVAudioUnitVarispeed {
100 extern_methods!(
101 #[unsafe(method(init))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
104
105 #[unsafe(method(new))]
106 #[unsafe(method_family = new)]
107 pub unsafe fn new() -> Retained<Self>;
108 );
109}