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