objc2_avf_audio/generated/
AVAudioMixerNode.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
7use crate::*;
8
9extern_class!(
10    /// A node that mixes its inputs to a single output.
11    ///
12    /// Mixers may have any number of inputs.
13    ///
14    /// The mixer accepts input at any sample rate and efficiently combines sample rate
15    /// conversions. It also accepts any channel count and will correctly upmix or downmix
16    /// to the output channel count.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiomixernode?language=objc)
19    #[unsafe(super(AVAudioNode, NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(feature = "AVAudioNode")]
22    pub struct AVAudioMixerNode;
23);
24
25#[cfg(all(feature = "AVAudioMixing", feature = "AVAudioNode"))]
26unsafe impl AVAudio3DMixing for AVAudioMixerNode {}
27
28#[cfg(all(feature = "AVAudioMixing", feature = "AVAudioNode"))]
29unsafe impl AVAudioMixing for AVAudioMixerNode {}
30
31#[cfg(all(feature = "AVAudioMixing", feature = "AVAudioNode"))]
32unsafe impl AVAudioStereoMixing for AVAudioMixerNode {}
33
34#[cfg(feature = "AVAudioNode")]
35unsafe impl NSObjectProtocol for AVAudioMixerNode {}
36
37#[cfg(feature = "AVAudioNode")]
38impl AVAudioMixerNode {
39    extern_methods!(
40        #[unsafe(method(init))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44        /// The mixer's output volume.
45        ///
46        /// This accesses the mixer's output volume (0.0-1.0, inclusive).
47        #[unsafe(method(outputVolume))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn outputVolume(&self) -> c_float;
50
51        /// Setter for [`outputVolume`][Self::outputVolume].
52        #[unsafe(method(setOutputVolume:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setOutputVolume(&self, output_volume: c_float);
55
56        #[cfg(feature = "AVAudioTypes")]
57        /// Find an unused input bus.
58        ///
59        /// This will find and return the first input bus to which no other node is connected.
60        #[unsafe(method(nextAvailableInputBus))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn nextAvailableInputBus(&self) -> AVAudioNodeBus;
63    );
64}
65
66/// Methods declared on superclass `NSObject`.
67#[cfg(feature = "AVAudioNode")]
68impl AVAudioMixerNode {
69    extern_methods!(
70        #[unsafe(method(new))]
71        #[unsafe(method_family = new)]
72        pub unsafe fn new() -> Retained<Self>;
73    );
74}