1 module pulse.channelmap; 2 3 import core.stdc.config; 4 5 import pulse.sample; 6 7 extern (C): 8 9 /*** 10 This file is part of PulseAudio. 11 12 Copyright 2005-2006 Lennart Poettering 13 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB 14 15 PulseAudio is free software; you can redistribute it and/or modify 16 it under the terms of the GNU Lesser General Public License as published 17 by the Free Software Foundation; either version 2.1 of the License, 18 or (at your option) any later version. 19 20 PulseAudio is distributed in the hope that it will be useful, but 21 WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 General Public License for more details. 24 25 You should have received a copy of the GNU Lesser General Public License 26 along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 27 ***/ 28 29 /** \page channelmap Channel Maps 30 * 31 * \section overv_sec Overview 32 * 33 * Channel maps provide a way to associate channels in a stream with a 34 * specific speaker position. This relieves applications of having to 35 * make sure their channel order is identical to the final output. 36 * 37 * \section init_sec Initialisation 38 * 39 * A channel map consists of an array of \ref pa_channel_position values, 40 * one for each channel. This array is stored together with a channel count 41 * in a pa_channel_map structure. 42 * 43 * Before filling the structure, the application must initialise it using 44 * pa_channel_map_init(). There are also a number of convenience functions 45 * for standard channel mappings: 46 * 47 * \li pa_channel_map_init_mono() - Create a channel map with only mono audio. 48 * \li pa_channel_map_init_stereo() - Create a standard stereo mapping. 49 * \li pa_channel_map_init_auto() - Create a standard channel map for a specific 50 * number of channels. 51 * \li pa_channel_map_init_extend() - Similar to pa_channel_map_init_auto() but 52 * synthesize a channel map if no predefined 53 * one is known for the specified number of 54 * channels. 55 * 56 * \section conv_sec Convenience Functions 57 * 58 * The library contains a number of convenience functions for dealing with 59 * channel maps: 60 * 61 * \li pa_channel_map_valid() - Tests if a channel map is valid. 62 * \li pa_channel_map_equal() - Tests if two channel maps are identical. 63 * \li pa_channel_map_snprint() - Creates a textual description of a channel 64 * map. 65 */ 66 67 /** \file 68 * Constants and routines for channel mapping handling 69 * 70 * See also \subpage channelmap 71 */ 72 73 /** A list of channel labels */ 74 enum pa_channel_position 75 { 76 PA_CHANNEL_POSITION_INVALID = -1, 77 PA_CHANNEL_POSITION_MONO = 0, 78 79 PA_CHANNEL_POSITION_FRONT_LEFT = 1, /**< Apple, Dolby call this 'Left' */ 80 PA_CHANNEL_POSITION_FRONT_RIGHT = 2, /**< Apple, Dolby call this 'Right' */ 81 PA_CHANNEL_POSITION_FRONT_CENTER = 3, /**< Apple, Dolby call this 'Center' */ 82 83 /** \cond fulldocs */ 84 PA_CHANNEL_POSITION_LEFT = PA_CHANNEL_POSITION_FRONT_LEFT, 85 PA_CHANNEL_POSITION_RIGHT = PA_CHANNEL_POSITION_FRONT_RIGHT, 86 PA_CHANNEL_POSITION_CENTER = PA_CHANNEL_POSITION_FRONT_CENTER, 87 /** \endcond */ 88 89 PA_CHANNEL_POSITION_REAR_CENTER = 4, /**< Microsoft calls this 'Back Center', Apple calls this 'Center Surround', Dolby calls this 'Surround Rear Center' */ 90 PA_CHANNEL_POSITION_REAR_LEFT = 5, /**< Microsoft calls this 'Back Left', Apple calls this 'Left Surround' (!), Dolby calls this 'Surround Rear Left' */ 91 PA_CHANNEL_POSITION_REAR_RIGHT = 6, /**< Microsoft calls this 'Back Right', Apple calls this 'Right Surround' (!), Dolby calls this 'Surround Rear Right' */ 92 93 PA_CHANNEL_POSITION_LFE = 7, /**< Microsoft calls this 'Low Frequency', Apple calls this 'LFEScreen' */ 94 /** \cond fulldocs */ 95 PA_CHANNEL_POSITION_SUBWOOFER = PA_CHANNEL_POSITION_LFE, 96 /** \endcond */ 97 98 PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER = 8, /**< Apple, Dolby call this 'Left Center' */ 99 PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER = 9, /**< Apple, Dolby call this 'Right Center */ 100 101 PA_CHANNEL_POSITION_SIDE_LEFT = 10, /**< Apple calls this 'Left Surround Direct', Dolby calls this 'Surround Left' (!) */ 102 PA_CHANNEL_POSITION_SIDE_RIGHT = 11, /**< Apple calls this 'Right Surround Direct', Dolby calls this 'Surround Right' (!) */ 103 104 PA_CHANNEL_POSITION_AUX0 = 12, 105 PA_CHANNEL_POSITION_AUX1 = 13, 106 PA_CHANNEL_POSITION_AUX2 = 14, 107 PA_CHANNEL_POSITION_AUX3 = 15, 108 PA_CHANNEL_POSITION_AUX4 = 16, 109 PA_CHANNEL_POSITION_AUX5 = 17, 110 PA_CHANNEL_POSITION_AUX6 = 18, 111 PA_CHANNEL_POSITION_AUX7 = 19, 112 PA_CHANNEL_POSITION_AUX8 = 20, 113 PA_CHANNEL_POSITION_AUX9 = 21, 114 PA_CHANNEL_POSITION_AUX10 = 22, 115 PA_CHANNEL_POSITION_AUX11 = 23, 116 PA_CHANNEL_POSITION_AUX12 = 24, 117 PA_CHANNEL_POSITION_AUX13 = 25, 118 PA_CHANNEL_POSITION_AUX14 = 26, 119 PA_CHANNEL_POSITION_AUX15 = 27, 120 PA_CHANNEL_POSITION_AUX16 = 28, 121 PA_CHANNEL_POSITION_AUX17 = 29, 122 PA_CHANNEL_POSITION_AUX18 = 30, 123 PA_CHANNEL_POSITION_AUX19 = 31, 124 PA_CHANNEL_POSITION_AUX20 = 32, 125 PA_CHANNEL_POSITION_AUX21 = 33, 126 PA_CHANNEL_POSITION_AUX22 = 34, 127 PA_CHANNEL_POSITION_AUX23 = 35, 128 PA_CHANNEL_POSITION_AUX24 = 36, 129 PA_CHANNEL_POSITION_AUX25 = 37, 130 PA_CHANNEL_POSITION_AUX26 = 38, 131 PA_CHANNEL_POSITION_AUX27 = 39, 132 PA_CHANNEL_POSITION_AUX28 = 40, 133 PA_CHANNEL_POSITION_AUX29 = 41, 134 PA_CHANNEL_POSITION_AUX30 = 42, 135 PA_CHANNEL_POSITION_AUX31 = 43, 136 137 PA_CHANNEL_POSITION_TOP_CENTER = 44, /**< Apple calls this 'Top Center Surround' */ 138 139 PA_CHANNEL_POSITION_TOP_FRONT_LEFT = 45, /**< Apple calls this 'Vertical Height Left' */ 140 PA_CHANNEL_POSITION_TOP_FRONT_RIGHT = 46, /**< Apple calls this 'Vertical Height Right' */ 141 PA_CHANNEL_POSITION_TOP_FRONT_CENTER = 47, /**< Apple calls this 'Vertical Height Center' */ 142 143 PA_CHANNEL_POSITION_TOP_REAR_LEFT = 48, /**< Microsoft and Apple call this 'Top Back Left' */ 144 PA_CHANNEL_POSITION_TOP_REAR_RIGHT = 49, /**< Microsoft and Apple call this 'Top Back Right' */ 145 PA_CHANNEL_POSITION_TOP_REAR_CENTER = 50, /**< Microsoft and Apple call this 'Top Back Center' */ 146 147 PA_CHANNEL_POSITION_MAX = 51 148 } 149 150 alias pa_channel_position_t = pa_channel_position; 151 152 /** \cond fulldocs */ 153 enum PA_CHANNEL_POSITION_INVALID = pa_channel_position_t.PA_CHANNEL_POSITION_INVALID; 154 enum PA_CHANNEL_POSITION_MONO = pa_channel_position_t.PA_CHANNEL_POSITION_MONO; 155 enum PA_CHANNEL_POSITION_LEFT = pa_channel_position_t.PA_CHANNEL_POSITION_LEFT; 156 enum PA_CHANNEL_POSITION_RIGHT = pa_channel_position_t.PA_CHANNEL_POSITION_RIGHT; 157 enum PA_CHANNEL_POSITION_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_CENTER; 158 enum PA_CHANNEL_POSITION_FRONT_LEFT = pa_channel_position_t.PA_CHANNEL_POSITION_FRONT_LEFT; 159 enum PA_CHANNEL_POSITION_FRONT_RIGHT = pa_channel_position_t.PA_CHANNEL_POSITION_FRONT_RIGHT; 160 enum PA_CHANNEL_POSITION_FRONT_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_FRONT_CENTER; 161 enum PA_CHANNEL_POSITION_REAR_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_REAR_CENTER; 162 enum PA_CHANNEL_POSITION_REAR_LEFT = pa_channel_position_t.PA_CHANNEL_POSITION_REAR_LEFT; 163 enum PA_CHANNEL_POSITION_REAR_RIGHT = pa_channel_position_t.PA_CHANNEL_POSITION_REAR_RIGHT; 164 enum PA_CHANNEL_POSITION_LFE = pa_channel_position_t.PA_CHANNEL_POSITION_LFE; 165 enum PA_CHANNEL_POSITION_SUBWOOFER = pa_channel_position_t.PA_CHANNEL_POSITION_SUBWOOFER; 166 enum PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER; 167 enum PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER; 168 enum PA_CHANNEL_POSITION_SIDE_LEFT = pa_channel_position_t.PA_CHANNEL_POSITION_SIDE_LEFT; 169 enum PA_CHANNEL_POSITION_SIDE_RIGHT = pa_channel_position_t.PA_CHANNEL_POSITION_SIDE_RIGHT; 170 enum PA_CHANNEL_POSITION_AUX0 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX0; 171 enum PA_CHANNEL_POSITION_AUX1 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX1; 172 enum PA_CHANNEL_POSITION_AUX2 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX2; 173 enum PA_CHANNEL_POSITION_AUX3 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX3; 174 enum PA_CHANNEL_POSITION_AUX4 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX4; 175 enum PA_CHANNEL_POSITION_AUX5 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX5; 176 enum PA_CHANNEL_POSITION_AUX6 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX6; 177 enum PA_CHANNEL_POSITION_AUX7 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX7; 178 enum PA_CHANNEL_POSITION_AUX8 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX8; 179 enum PA_CHANNEL_POSITION_AUX9 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX9; 180 enum PA_CHANNEL_POSITION_AUX10 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX10; 181 enum PA_CHANNEL_POSITION_AUX11 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX11; 182 enum PA_CHANNEL_POSITION_AUX12 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX12; 183 enum PA_CHANNEL_POSITION_AUX13 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX13; 184 enum PA_CHANNEL_POSITION_AUX14 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX14; 185 enum PA_CHANNEL_POSITION_AUX15 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX15; 186 enum PA_CHANNEL_POSITION_AUX16 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX16; 187 enum PA_CHANNEL_POSITION_AUX17 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX17; 188 enum PA_CHANNEL_POSITION_AUX18 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX18; 189 enum PA_CHANNEL_POSITION_AUX19 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX19; 190 enum PA_CHANNEL_POSITION_AUX20 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX20; 191 enum PA_CHANNEL_POSITION_AUX21 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX21; 192 enum PA_CHANNEL_POSITION_AUX22 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX22; 193 enum PA_CHANNEL_POSITION_AUX23 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX23; 194 enum PA_CHANNEL_POSITION_AUX24 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX24; 195 enum PA_CHANNEL_POSITION_AUX25 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX25; 196 enum PA_CHANNEL_POSITION_AUX26 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX26; 197 enum PA_CHANNEL_POSITION_AUX27 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX27; 198 enum PA_CHANNEL_POSITION_AUX28 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX28; 199 enum PA_CHANNEL_POSITION_AUX29 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX29; 200 enum PA_CHANNEL_POSITION_AUX30 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX30; 201 enum PA_CHANNEL_POSITION_AUX31 = pa_channel_position_t.PA_CHANNEL_POSITION_AUX31; 202 enum PA_CHANNEL_POSITION_TOP_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_CENTER; 203 enum PA_CHANNEL_POSITION_TOP_FRONT_LEFT = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_FRONT_LEFT; 204 enum PA_CHANNEL_POSITION_TOP_FRONT_RIGHT = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_FRONT_RIGHT; 205 enum PA_CHANNEL_POSITION_TOP_FRONT_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_FRONT_CENTER; 206 enum PA_CHANNEL_POSITION_TOP_REAR_LEFT = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_REAR_LEFT; 207 enum PA_CHANNEL_POSITION_TOP_REAR_RIGHT = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_REAR_RIGHT; 208 enum PA_CHANNEL_POSITION_TOP_REAR_CENTER = pa_channel_position_t.PA_CHANNEL_POSITION_TOP_REAR_CENTER; 209 enum PA_CHANNEL_POSITION_MAX = pa_channel_position_t.PA_CHANNEL_POSITION_MAX; 210 /** \endcond */ 211 212 /** A mask of channel positions. \since 0.9.16 */ 213 alias pa_channel_position_mask_t = c_ulong; 214 215 /** Makes a bit mask from a channel position. \since 0.9.16 */ 216 extern (D) auto PA_CHANNEL_POSITION_MASK(T)(auto ref T f) 217 { 218 return cast(pa_channel_position_mask_t) cast(ulong)1 << f; 219 } 220 221 /** A list of channel mapping definitions for pa_channel_map_init_auto() */ 222 enum pa_channel_map_def 223 { 224 PA_CHANNEL_MAP_AIFF = 0, 225 /**< The mapping from RFC3551, which is based on AIFF-C */ 226 227 /** \cond fulldocs */ 228 PA_CHANNEL_MAP_ALSA = 1, 229 /**< The default mapping used by ALSA. This mapping is probably 230 * not too useful since ALSA's default channel mapping depends on 231 * the device string used. */ 232 /** \endcond */ 233 234 PA_CHANNEL_MAP_AUX = 2, 235 /**< Only aux channels */ 236 237 PA_CHANNEL_MAP_WAVEEX = 3, 238 /**< Microsoft's WAVEFORMATEXTENSIBLE mapping. This mapping works 239 * as if all LSBs of dwChannelMask are set. */ 240 241 /** \cond fulldocs */ 242 PA_CHANNEL_MAP_OSS = 4, 243 /**< The default channel mapping used by OSS as defined in the OSS 244 * 4.0 API specs. This mapping is probably not too useful since 245 * the OSS API has changed in this respect and no longer knows a 246 * default channel mapping based on the number of channels. */ 247 /** \endcond */ 248 249 /**< Upper limit of valid channel mapping definitions */ 250 PA_CHANNEL_MAP_DEF_MAX = 5, 251 252 PA_CHANNEL_MAP_DEFAULT = PA_CHANNEL_MAP_AIFF 253 /**< The default channel map */ 254 } 255 256 alias pa_channel_map_def_t = pa_channel_map_def; 257 258 /** \cond fulldocs */ 259 enum PA_CHANNEL_MAP_AIFF = pa_channel_map_def_t.PA_CHANNEL_MAP_AIFF; 260 enum PA_CHANNEL_MAP_ALSA = pa_channel_map_def_t.PA_CHANNEL_MAP_ALSA; 261 enum PA_CHANNEL_MAP_AUX = pa_channel_map_def_t.PA_CHANNEL_MAP_AUX; 262 enum PA_CHANNEL_MAP_WAVEEX = pa_channel_map_def_t.PA_CHANNEL_MAP_WAVEEX; 263 enum PA_CHANNEL_MAP_OSS = pa_channel_map_def_t.PA_CHANNEL_MAP_OSS; 264 enum PA_CHANNEL_MAP_DEF_MAX = pa_channel_map_def_t.PA_CHANNEL_MAP_DEF_MAX; 265 enum PA_CHANNEL_MAP_DEFAULT = pa_channel_map_def_t.PA_CHANNEL_MAP_DEFAULT; 266 /** \endcond */ 267 268 /** A channel map which can be used to attach labels to specific 269 * channels of a stream. These values are relevant for conversion and 270 * mixing of streams */ 271 struct pa_channel_map 272 { 273 ubyte channels; 274 /**< Number of channels mapped */ 275 276 pa_channel_position_t[PA_CHANNELS_MAX] map; 277 /**< Channel labels */ 278 } 279 280 /** Initialize the specified channel map and return a pointer to 281 * it. The channel map will have a defined state but 282 * pa_channel_map_valid() will fail for it. */ 283 pa_channel_map* pa_channel_map_init (pa_channel_map* m); 284 285 /** Initialize the specified channel map for monaural audio and return a pointer to it */ 286 pa_channel_map* pa_channel_map_init_mono (pa_channel_map* m); 287 288 /** Initialize the specified channel map for stereophonic audio and return a pointer to it */ 289 pa_channel_map* pa_channel_map_init_stereo (pa_channel_map* m); 290 291 /** Initialize the specified channel map for the specified number of 292 * channels using default labels and return a pointer to it. This call 293 * will fail (return NULL) if there is no default channel map known for this 294 * specific number of channels and mapping. */ 295 pa_channel_map* pa_channel_map_init_auto (pa_channel_map* m, uint channels, pa_channel_map_def_t def); 296 297 /** Similar to pa_channel_map_init_auto() but instead of failing if no 298 * default mapping is known with the specified parameters it will 299 * synthesize a mapping based on a known mapping with fewer channels 300 * and fill up the rest with AUX0...AUX31 channels \since 0.9.11 */ 301 pa_channel_map* pa_channel_map_init_extend (pa_channel_map* m, uint channels, pa_channel_map_def_t def); 302 303 /** Return a text label for the specified channel position */ 304 const(char)* pa_channel_position_to_string (pa_channel_position_t pos); 305 306 /** The inverse of pa_channel_position_to_string(). \since 0.9.16 */ 307 pa_channel_position_t pa_channel_position_from_string (const(char)* s); 308 309 /** Return a human readable text label for the specified channel position. \since 0.9.7 */ 310 const(char)* pa_channel_position_to_pretty_string (pa_channel_position_t pos); 311 312 /** The maximum length of strings returned by 313 * pa_channel_map_snprint(). Please note that this value can change 314 * with any release without warning and without being considered API 315 * or ABI breakage. You should not use this definition anywhere where 316 * it might become part of an ABI. */ 317 enum PA_CHANNEL_MAP_SNPRINT_MAX = 336; 318 319 /** Make a human readable string from the specified channel map. Returns \a s. */ 320 char* pa_channel_map_snprint (char* s, size_t l, const(pa_channel_map)* map); 321 322 /** Parse a channel position list or well-known mapping name into a 323 * channel map structure. This turns the output of 324 * pa_channel_map_snprint() and pa_channel_map_to_name() back into a 325 * pa_channel_map */ 326 pa_channel_map* pa_channel_map_parse (pa_channel_map* map, const(char)* s); 327 328 /** Compare two channel maps. Return 1 if both match. */ 329 int pa_channel_map_equal (const(pa_channel_map)* a, const(pa_channel_map)* b); 330 331 /** Return non-zero if the specified channel map is considered valid */ 332 int pa_channel_map_valid (const(pa_channel_map)* map); 333 334 /** Return non-zero if the specified channel map is compatible with 335 * the specified sample spec. \since 0.9.12 */ 336 int pa_channel_map_compatible (const(pa_channel_map)* map, const(pa_sample_spec)* ss); 337 338 /** Returns non-zero if every channel defined in b is also defined in a. \since 0.9.15 */ 339 int pa_channel_map_superset (const(pa_channel_map)* a, const(pa_channel_map)* b); 340 341 /** Returns non-zero if it makes sense to apply a volume 'balance' 342 * with this mapping, i.e.\ if there are left/right channels 343 * available. \since 0.9.15 */ 344 int pa_channel_map_can_balance (const(pa_channel_map)* map); 345 346 /** Returns non-zero if it makes sense to apply a volume 'fade' 347 * (i.e.\ 'balance' between front and rear) with this mapping, i.e.\ if 348 * there are front/rear channels available. \since 0.9.15 */ 349 int pa_channel_map_can_fade (const(pa_channel_map)* map); 350 351 /** Returns non-zero if it makes sense to apply a volume 'lfe balance' 352 * (i.e.\ 'balance' between LFE and non-LFE channels) with this mapping, 353 * i.e.\ if there are LFE and non-LFE channels available. \since 8.0 */ 354 int pa_channel_map_can_lfe_balance (const(pa_channel_map)* map); 355 356 /** Tries to find a well-known channel mapping name for this channel 357 * mapping, i.e.\ "stereo", "surround-71" and so on. If the channel 358 * mapping is unknown NULL will be returned. This name can be parsed 359 * with pa_channel_map_parse() \since 0.9.15 */ 360 const(char)* pa_channel_map_to_name (const(pa_channel_map)* map); 361 362 /** Tries to find a human readable text label for this channel 363 mapping, i.e.\ "Stereo", "Surround 7.1" and so on. If the channel 364 mapping is unknown NULL will be returned. \since 0.9.15 */ 365 const(char)* pa_channel_map_to_pretty_name (const(pa_channel_map)* map); 366 367 /** Returns non-zero if the specified channel position is available at 368 * least once in the channel map. \since 0.9.16 */ 369 int pa_channel_map_has_position (const(pa_channel_map)* map, pa_channel_position_t p); 370 371 /** Generates a bit mask from a channel map. \since 0.9.16 */ 372 pa_channel_position_mask_t pa_channel_map_mask (const(pa_channel_map)* map); 373