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))]
31extern_conformance!(
32 unsafe impl NSObjectProtocol for AVAudioUnitVarispeed {}
33);
34
35#[cfg(all(
36 feature = "AVAudioNode",
37 feature = "AVAudioUnit",
38 feature = "AVAudioUnitTimeEffect"
39))]
40impl AVAudioUnitVarispeed {
41 extern_methods!(
42 #[unsafe(method(rate))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn rate(&self) -> c_float;
62
63 #[unsafe(method(setRate:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setRate(&self, rate: c_float);
67 );
68}
69
70#[cfg(all(
72 feature = "AVAudioNode",
73 feature = "AVAudioUnit",
74 feature = "AVAudioUnitTimeEffect"
75))]
76impl AVAudioUnitVarispeed {
77 extern_methods!(
78 #[cfg(feature = "objc2-audio-toolbox")]
79 #[cfg(not(target_os = "watchos"))]
80 #[unsafe(method(initWithAudioComponentDescription:))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn initWithAudioComponentDescription(
89 this: Allocated<Self>,
90 audio_component_description: AudioComponentDescription,
91 ) -> Retained<Self>;
92 );
93}
94
95#[cfg(all(
97 feature = "AVAudioNode",
98 feature = "AVAudioUnit",
99 feature = "AVAudioUnitTimeEffect"
100))]
101impl AVAudioUnitVarispeed {
102 extern_methods!(
103 #[unsafe(method(init))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
106
107 #[unsafe(method(new))]
108 #[unsafe(method_family = new)]
109 pub unsafe fn new() -> Retained<Self>;
110 );
111}