objc2_avf_audio/generated/
AVAudioUnitTimeEffect.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// an AVAudioUnit that processes audio in non real-time
14    ///
15    /// An AVAudioUnitTimeEffect represents an audio unit of type aufc.
16    /// These effects do not process audio in real-time. The varispeed
17    /// unit is an example of a time effect unit.
18    ///
19    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiounittimeeffect?language=objc)
20    #[unsafe(super(AVAudioUnit, AVAudioNode, NSObject))]
21    #[derive(Debug, PartialEq, Eq, Hash)]
22    #[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
23    pub struct AVAudioUnitTimeEffect;
24);
25
26#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
27unsafe impl NSObjectProtocol for AVAudioUnitTimeEffect {}
28
29#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
30impl AVAudioUnitTimeEffect {
31    extern_methods!(
32        #[cfg(feature = "objc2-audio-toolbox")]
33        #[cfg(not(target_os = "watchos"))]
34        /// create an AVAudioUnitTimeEffect object
35        ///
36        ///
37        /// Parameter `audioComponentDescription`: AudioComponentDescription of the audio unit to be initialized
38        ///
39        /// The componentType must be kAudioUnitType_FormatConverter
40        #[unsafe(method(initWithAudioComponentDescription:))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn initWithAudioComponentDescription(
43            this: Allocated<Self>,
44            audio_component_description: AudioComponentDescription,
45        ) -> Retained<Self>;
46
47        /// bypass state of the audio unit
48        #[unsafe(method(bypass))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn bypass(&self) -> bool;
51
52        /// Setter for [`bypass`][Self::bypass].
53        #[unsafe(method(setBypass:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setBypass(&self, bypass: bool);
56    );
57}
58
59/// Methods declared on superclass `NSObject`.
60#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
61impl AVAudioUnitTimeEffect {
62    extern_methods!(
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}