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"))]
26extern_conformance!(
27    unsafe impl AVAudio3DMixing for AVAudioMixerNode {}
28);
29
30#[cfg(all(feature = "AVAudioMixing", feature = "AVAudioNode"))]
31extern_conformance!(
32    unsafe impl AVAudioMixing for AVAudioMixerNode {}
33);
34
35#[cfg(all(feature = "AVAudioMixing", feature = "AVAudioNode"))]
36extern_conformance!(
37    unsafe impl AVAudioStereoMixing for AVAudioMixerNode {}
38);
39
40#[cfg(feature = "AVAudioNode")]
41extern_conformance!(
42    unsafe impl NSObjectProtocol for AVAudioMixerNode {}
43);
44
45#[cfg(feature = "AVAudioNode")]
46impl AVAudioMixerNode {
47    extern_methods!(
48        #[unsafe(method(init))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
51
52        /// The mixer's output volume.
53        ///
54        /// This accesses the mixer's output volume (0.0-1.0, inclusive).
55        #[unsafe(method(outputVolume))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn outputVolume(&self) -> c_float;
58
59        /// Setter for [`outputVolume`][Self::outputVolume].
60        #[unsafe(method(setOutputVolume:))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn setOutputVolume(&self, output_volume: c_float);
63
64        #[cfg(feature = "AVAudioTypes")]
65        /// Find an unused input bus.
66        ///
67        /// This will find and return the first input bus to which no other node is connected.
68        #[unsafe(method(nextAvailableInputBus))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn nextAvailableInputBus(&self) -> AVAudioNodeBus;
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75#[cfg(feature = "AVAudioNode")]
76impl AVAudioMixerNode {
77    extern_methods!(
78        #[unsafe(method(new))]
79        #[unsafe(method_family = new)]
80        pub unsafe fn new() -> Retained<Self>;
81    );
82}