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"))]
27extern_conformance!(
28    unsafe impl NSObjectProtocol for AVAudioUnitTimeEffect {}
29);
30
31#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
32impl AVAudioUnitTimeEffect {
33    extern_methods!(
34        #[cfg(feature = "objc2-audio-toolbox")]
35        #[cfg(not(target_os = "watchos"))]
36        /// create an AVAudioUnitTimeEffect object
37        ///
38        ///
39        /// Parameter `audioComponentDescription`: AudioComponentDescription of the audio unit to be initialized
40        ///
41        /// The componentType must be kAudioUnitType_FormatConverter
42        #[unsafe(method(initWithAudioComponentDescription:))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn initWithAudioComponentDescription(
45            this: Allocated<Self>,
46            audio_component_description: AudioComponentDescription,
47        ) -> Retained<Self>;
48
49        /// bypass state of the audio unit
50        #[unsafe(method(bypass))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn bypass(&self) -> bool;
53
54        /// Setter for [`bypass`][Self::bypass].
55        #[unsafe(method(setBypass:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn setBypass(&self, bypass: bool);
58    );
59}
60
61/// Methods declared on superclass `NSObject`.
62#[cfg(all(feature = "AVAudioNode", feature = "AVAudioUnit"))]
63impl AVAudioUnitTimeEffect {
64    extern_methods!(
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72    );
73}