1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-audio-types")]
use objc2_core_audio_types::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// A description of the roles of a set of audio channels.
///
/// This object is a thin wrapper for the AudioChannelLayout structure, described
/// in
/// <CoreAudio
/// /CoreAudioTypes.h>.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiochannellayout?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVAudioChannelLayout;
);
unsafe impl Send for AVAudioChannelLayout {}
unsafe impl Sync for AVAudioChannelLayout {}
extern_conformance!(
unsafe impl NSCoding for AVAudioChannelLayout {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for AVAudioChannelLayout {}
);
extern_conformance!(
unsafe impl NSSecureCoding for AVAudioChannelLayout {}
);
impl AVAudioChannelLayout {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "objc2-core-audio-types")]
/// Initialize from a layout tag.
///
/// Parameter `layoutTag`: The tag.
///
/// Returns nil if the tag is either kAudioChannelLayoutTag_UseChannelDescriptions or
/// kAudioChannelLayoutTag_UseChannelBitmap.
#[unsafe(method(initWithLayoutTag:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLayoutTag(
this: Allocated<Self>,
layout_tag: AudioChannelLayoutTag,
) -> Option<Retained<Self>>;
#[cfg(feature = "objc2-core-audio-types")]
/// Initialize from an AudioChannelLayout.
///
/// Parameter `layout`: The AudioChannelLayout.
///
/// If the provided layout's tag is kAudioChannelLayoutTag_UseChannelDescriptions, this
/// initializer attempts to convert it to a more specific tag.
///
/// # Safety
///
/// `layout` must be a valid pointer.
#[unsafe(method(initWithLayout:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLayout(
this: Allocated<Self>,
layout: NonNull<AudioChannelLayout>,
) -> Retained<Self>;
/// Determine whether another AVAudioChannelLayout is exactly equal to this layout.
///
/// Parameter `object`: The AVAudioChannelLayout to compare against.
///
/// The underlying AudioChannelLayoutTag and AudioChannelLayout are compared for equality.
///
/// # Safety
///
/// `object` should be of the correct type.
#[unsafe(method(isEqual:))]
#[unsafe(method_family = none)]
pub unsafe fn isEqual(&self, object: &AnyObject) -> bool;
#[cfg(feature = "objc2-core-audio-types")]
/// Create from a layout tag.
#[unsafe(method(layoutWithLayoutTag:))]
#[unsafe(method_family = none)]
pub unsafe fn layoutWithLayoutTag(layout_tag: AudioChannelLayoutTag) -> Retained<Self>;
#[cfg(feature = "objc2-core-audio-types")]
/// Create from an AudioChannelLayout
///
/// # Safety
///
/// `layout` must be a valid pointer.
#[unsafe(method(layoutWithLayout:))]
#[unsafe(method_family = none)]
pub unsafe fn layoutWithLayout(layout: NonNull<AudioChannelLayout>) -> Retained<Self>;
#[cfg(feature = "objc2-core-audio-types")]
/// The layout's tag.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(layoutTag))]
#[unsafe(method_family = none)]
pub unsafe fn layoutTag(&self) -> AudioChannelLayoutTag;
#[cfg(feature = "objc2-core-audio-types")]
/// The underlying AudioChannelLayout.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(layout))]
#[unsafe(method_family = none)]
pub unsafe fn layout(&self) -> NonNull<AudioChannelLayout>;
#[cfg(feature = "AVAudioTypes")]
/// The number of channels of audio data.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(channelCount))]
#[unsafe(method_family = none)]
pub unsafe fn channelCount(&self) -> AVAudioChannelCount;
);
}
/// Methods declared on superclass `NSObject`.
impl AVAudioChannelLayout {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}