1 /* 2 * Copyright (C) 2014 Michal Ratajsky <michal.ratajsky@gmail.com> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the licence, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef MATEMIXER_ENUMS_H 19 #define MATEMIXER_ENUMS_H 20 21 /* 22 * GTypes are not generated by glib-mkenums, see: 23 * https://bugzilla.gnome.org/show_bug.cgi?id=621942 24 */ 25 26 /** 27 * MateMixerState: 28 * @MATE_MIXER_STATE_IDLE: 29 * Not connected. 30 * @MATE_MIXER_STATE_CONNECTING: 31 * Connection is in progress. 32 * @MATE_MIXER_STATE_READY: 33 * Connected. 34 * @MATE_MIXER_STATE_FAILED: 35 * Connection has failed. 36 * @MATE_MIXER_STATE_UNKNOWN: 37 * Unknown state. This state is used as an error indicator. 38 * 39 * State of a connection to a sound system. 40 */ 41 typedef enum { 42 MATE_MIXER_STATE_IDLE, 43 MATE_MIXER_STATE_CONNECTING, 44 MATE_MIXER_STATE_READY, 45 MATE_MIXER_STATE_FAILED, 46 MATE_MIXER_STATE_UNKNOWN 47 } MateMixerState; 48 49 /** 50 * MateMixerBackendType: 51 * @MATE_MIXER_BACKEND_UNKNOWN: 52 * Unknown or undefined sound system backend type. 53 * @MATE_MIXER_BACKEND_PULSEAUDIO: 54 * PulseAudio sound system backend. It has the highest priority and 55 * will be the first one to try when you call mate_mixer_context_open(), 56 * unless you select a specific sound system to connect to. 57 * @MATE_MIXER_BACKEND_ALSA: 58 * The Advanced Linux Sound Architecture sound system. 59 * @MATE_MIXER_BACKEND_OSS: 60 * The Open Sound System. 61 * @MATE_MIXER_BACKEND_NULL: 62 * Fallback backend which never fails to initialize, but provides no 63 * functionality. This backend has the lowest priority and will be used 64 * if you do not select a specific backend and it isn't possible to use 65 * any of the other backends. 66 * 67 * Constants identifying a sound system backend. 68 */ 69 typedef enum { 70 MATE_MIXER_BACKEND_UNKNOWN, 71 MATE_MIXER_BACKEND_PULSEAUDIO, 72 MATE_MIXER_BACKEND_ALSA, 73 MATE_MIXER_BACKEND_OSS, 74 MATE_MIXER_BACKEND_NULL 75 } MateMixerBackendType; 76 77 /** 78 * MateMixerBackendFlags: 79 * @MATE_MIXER_BACKEND_NO_FLAGS: 80 * No flags. 81 * @MATE_MIXER_BACKEND_HAS_APPLICATION_CONTROLS: 82 * The sound system backend includes support for application stream controls, 83 * allowing per-application volume control. 84 * @MATE_MIXER_BACKEND_HAS_STORED_CONTROLS: 85 * The sound system backend includes support for stored controls. See the 86 * #MateMixerStoredControl description for more information. 87 * The presence of this flag does not guarantee that this feature is enabled 88 * in the sound system's configuration. 89 * @MATE_MIXER_BACKEND_CAN_SET_DEFAULT_INPUT_STREAM: 90 * The sound system backend is able to change the current default input stream 91 * using the mate_mixer_context_set_default_input_stream() function. 92 * @MATE_MIXER_BACKEND_CAN_SET_DEFAULT_OUTPUT_STREAM: 93 * The sound system backend is able to change the current default output stream 94 * using the mate_mixer_context_set_default_output_stream() function. 95 * 96 * Flags describing capabilities of a sound system. 97 */ 98 typedef enum { /*< flags >*/ 99 MATE_MIXER_BACKEND_NO_FLAGS = 0, 100 MATE_MIXER_BACKEND_HAS_APPLICATION_CONTROLS = 1 << 0, 101 MATE_MIXER_BACKEND_HAS_STORED_CONTROLS = 1 << 1, 102 MATE_MIXER_BACKEND_CAN_SET_DEFAULT_INPUT_STREAM = 1 << 2, 103 MATE_MIXER_BACKEND_CAN_SET_DEFAULT_OUTPUT_STREAM = 1 << 3 104 } MateMixerBackendFlags; 105 106 /** 107 * MateMixerDirection: 108 * @MATE_MIXER_DIRECTION_UNKNOWN: 109 * Unknown direction. 110 * @MATE_MIXER_DIRECTION_INPUT: 111 * Input direction (recording). 112 * @MATE_MIXER_DIRECTION_OUTPUT: 113 * Output direction (playback). 114 * 115 * Sound stream direction. 116 */ 117 typedef enum { 118 MATE_MIXER_DIRECTION_UNKNOWN, 119 MATE_MIXER_DIRECTION_INPUT, 120 MATE_MIXER_DIRECTION_OUTPUT, 121 } MateMixerDirection; 122 123 /** 124 * MateMixerStreamControlFlags: 125 * @MATE_MIXER_STREAM_CONTROL_NO_FLAGS: 126 * No flags. 127 * @MATE_MIXER_STREAM_CONTROL_MUTE_READABLE: 128 * The stream control includes a mute toggle and allows reading the mute state. 129 * @MATE_MIXER_STREAM_CONTROL_MUTE_WRITABLE: 130 * The stream control includes a mute toggle and allows changing the mute state. 131 * @MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE: 132 * The stream control includes a volume control and allows reading the volume. 133 * @MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE: 134 * The stream control includes a volume control and allows changing the volume. 135 * @MATE_MIXER_STREAM_CONTROL_CAN_BALANCE: 136 * The stream control includes the necessary channel positions to allow left/right 137 * volume balancing. 138 * @MATE_MIXER_STREAM_CONTROL_CAN_FADE: 139 * The stream control includes the necessary channel positions to allow front/back 140 * volume fading. 141 * @MATE_MIXER_STREAM_CONTROL_MOVABLE: 142 * It is possible to move the stream control to a different stream using the 143 * mate_mixer_stream_control_set_stream() function. See the function description 144 * for details. 145 * @MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL: 146 * The stream controls supports decibel values and it is possible to successfully 147 * use the functions which operate on decibel values. 148 * @MATE_MIXER_STREAM_CONTROL_HAS_MONITOR: 149 * The stream control supports peak level monitoring. 150 * @MATE_MIXER_STREAM_CONTROL_STORED: 151 * The stream control is a #MateMixerStoredControl. 152 * 153 * Flags describing capabilities and properties of a stream control. 154 */ 155 typedef enum { 156 MATE_MIXER_STREAM_CONTROL_NO_FLAGS = 0, 157 MATE_MIXER_STREAM_CONTROL_MUTE_READABLE = 1 << 0, 158 MATE_MIXER_STREAM_CONTROL_MUTE_WRITABLE = 1 << 1, 159 MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE = 1 << 2, 160 MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE = 1 << 3, 161 MATE_MIXER_STREAM_CONTROL_CAN_BALANCE = 1 << 4, 162 MATE_MIXER_STREAM_CONTROL_CAN_FADE = 1 << 5, 163 MATE_MIXER_STREAM_CONTROL_MOVABLE = 1 << 6, 164 MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL = 1 << 7, 165 MATE_MIXER_STREAM_CONTROL_HAS_MONITOR = 1 << 8, 166 MATE_MIXER_STREAM_CONTROL_STORED = 1 << 9 167 } MateMixerStreamControlFlags; 168 169 /** 170 * MateMixerStreamControlRole: 171 * @MATE_MIXER_STREAM_CONTROL_ROLE_UNKNOWN: 172 * Unknown role. 173 * @MATE_MIXER_STREAM_CONTROL_ROLE_MASTER: 174 * Master volume control. 175 * @MATE_MIXER_STREAM_CONTROL_ROLE_APPLICATION: 176 * Application volume control. 177 * @MATE_MIXER_STREAM_CONTROL_ROLE_PCM: 178 * PCM volume control. 179 * @MATE_MIXER_STREAM_CONTROL_ROLE_SPEAKER: 180 * Speaker volume control. 181 * @MATE_MIXER_STREAM_CONTROL_ROLE_MICROPHONE: 182 * Microphone volume control. 183 * @MATE_MIXER_STREAM_CONTROL_ROLE_PORT: 184 * Volume control for a connector of a sound device. 185 * @MATE_MIXER_STREAM_CONTROL_ROLE_BOOST: 186 * Boost control (for example a microphone boost or bass boost). 187 * @MATE_MIXER_STREAM_CONTROL_ROLE_BASS: 188 * Bass control. 189 * @MATE_MIXER_STREAM_CONTROL_ROLE_TREBLE: 190 * Treble control. 191 * @MATE_MIXER_STREAM_CONTROL_ROLE_CD: 192 * CD input volume control. 193 * @MATE_MIXER_STREAM_CONTROL_ROLE_VIDEO: 194 * Video volume control. 195 * @MATE_MIXER_STREAM_CONTROL_ROLE_MUSIC: 196 * Music volume control. 197 */ 198 typedef enum { 199 MATE_MIXER_STREAM_CONTROL_ROLE_UNKNOWN, 200 MATE_MIXER_STREAM_CONTROL_ROLE_MASTER, 201 MATE_MIXER_STREAM_CONTROL_ROLE_APPLICATION, 202 MATE_MIXER_STREAM_CONTROL_ROLE_PCM, 203 MATE_MIXER_STREAM_CONTROL_ROLE_SPEAKER, 204 MATE_MIXER_STREAM_CONTROL_ROLE_MICROPHONE, 205 MATE_MIXER_STREAM_CONTROL_ROLE_PORT, 206 MATE_MIXER_STREAM_CONTROL_ROLE_BOOST, 207 MATE_MIXER_STREAM_CONTROL_ROLE_BASS, 208 MATE_MIXER_STREAM_CONTROL_ROLE_TREBLE, 209 MATE_MIXER_STREAM_CONTROL_ROLE_CD, 210 MATE_MIXER_STREAM_CONTROL_ROLE_VIDEO, 211 MATE_MIXER_STREAM_CONTROL_ROLE_MUSIC 212 } MateMixerStreamControlRole; 213 214 /** 215 * MateMixerStreamControlMediaRole: 216 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN: 217 * Unknown media role. 218 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_VIDEO: 219 * Video role. 220 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_MUSIC: 221 * Music role. 222 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_GAME: 223 * Game role. 224 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_EVENT: 225 * Event sounds. 226 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_PHONE: 227 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_ANIMATION: 228 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_PRODUCTION: 229 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_A11Y: 230 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_TEST: 231 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_ABSTRACT: 232 * @MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_FILTER: 233 * 234 * Constants describing a media role of a control. These constants are mapped 235 * to PulseAudio media role property and therefore are only available when using 236 * the PulseAudio sound system. 237 * 238 * Media roles are commonly set by applications to indicate what kind of sound 239 * input/output they provide and may be the defining property of stored controls 240 * (for example an event role stored control can be used to provide a volume 241 * slider for event sounds). 242 * 243 * See the PulseAudio documentation for more detailed information about media 244 * roles. 245 */ 246 typedef enum { 247 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN, 248 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_VIDEO, 249 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_MUSIC, 250 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_GAME, 251 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_EVENT, 252 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_PHONE, 253 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_ANIMATION, 254 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_PRODUCTION, 255 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_A11Y, 256 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_TEST, 257 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_ABSTRACT, 258 MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_FILTER 259 } MateMixerStreamControlMediaRole; 260 261 /** 262 * MateMixerDeviceSwitchRole: 263 * @MATE_MIXER_DEVICE_SWITCH_ROLE_UNKNOWN: 264 * Unknown device switch role. 265 * @MATE_MIXER_DEVICE_SWITCH_ROLE_PROFILE: 266 * The switch changes the active sound device profile. 267 */ 268 typedef enum { 269 MATE_MIXER_DEVICE_SWITCH_ROLE_UNKNOWN, 270 MATE_MIXER_DEVICE_SWITCH_ROLE_PROFILE, 271 } MateMixerDeviceSwitchRole; 272 273 /** 274 * MateMixerStreamSwitchRole: 275 * @MATE_MIXER_STREAM_SWITCH_ROLE_UNKNOWN: 276 * Unknown stream switch role. 277 * @MATE_MIXER_STREAM_SWITCH_ROLE_PORT: 278 * The switch changes the active port. 279 * @MATE_MIXER_STREAM_SWITCH_ROLE_BOOST: 280 * The switch changes the boost value. 281 */ 282 typedef enum { 283 MATE_MIXER_STREAM_SWITCH_ROLE_UNKNOWN, 284 MATE_MIXER_STREAM_SWITCH_ROLE_PORT, 285 MATE_MIXER_STREAM_SWITCH_ROLE_BOOST 286 } MateMixerStreamSwitchRole; 287 288 /** 289 * MateMixerStreamSwitchFlags: 290 * @MATE_MIXER_STREAM_SWITCH_NO_FLAGS: 291 * No flags. 292 * @MATE_MIXER_STREAM_SWITCH_TOGGLE: 293 * The switch is a #MateMixerStreamToggle. 294 */ 295 typedef enum { /*< flags >*/ 296 MATE_MIXER_STREAM_SWITCH_NO_FLAGS = 0, 297 MATE_MIXER_STREAM_SWITCH_TOGGLE = 1 << 0, 298 } MateMixerStreamSwitchFlags; 299 300 /** 301 * MateMixerChannelPosition: 302 * @MATE_MIXER_CHANNEL_UNKNOWN: 303 * Unknown channel position. 304 * @MATE_MIXER_CHANNEL_MONO: 305 * Mono channel. Only used for single-channel controls. 306 * @MATE_MIXER_CHANNEL_FRONT_LEFT: 307 * Front left channel. 308 * @MATE_MIXER_CHANNEL_FRONT_RIGHT: 309 * Front right channel. 310 * @MATE_MIXER_CHANNEL_FRONT_CENTER: 311 * Front center channel. 312 * @MATE_MIXER_CHANNEL_LFE: 313 * Low-frequency effects channel (subwoofer). 314 * @MATE_MIXER_CHANNEL_BACK_LEFT: 315 * Back (rear) left channel. 316 * @MATE_MIXER_CHANNEL_BACK_RIGHT: 317 * Back (rear) right channel. 318 * @MATE_MIXER_CHANNEL_BACK_CENTER: 319 * Back (rear) center channel. 320 * @MATE_MIXER_CHANNEL_FRONT_LEFT_CENTER: 321 * Front left of center channel. 322 * @MATE_MIXER_CHANNEL_FRONT_RIGHT_CENTER: 323 * Front right of center channel. 324 * @MATE_MIXER_CHANNEL_SIDE_LEFT: 325 * Side left channel. 326 * @MATE_MIXER_CHANNEL_SIDE_RIGHT: 327 * Side right channel. 328 * @MATE_MIXER_CHANNEL_TOP_FRONT_LEFT: 329 * Top front left channel. 330 * @MATE_MIXER_CHANNEL_TOP_FRONT_RIGHT: 331 * Top front right channel. 332 * @MATE_MIXER_CHANNEL_TOP_FRONT_CENTER: 333 * Top front center channel. 334 * @MATE_MIXER_CHANNEL_TOP_CENTER: 335 * Top center channel. 336 * @MATE_MIXER_CHANNEL_TOP_BACK_LEFT: 337 * Top back (rear) left channel. 338 * @MATE_MIXER_CHANNEL_TOP_BACK_RIGHT: 339 * Top back (rear) right channel. 340 * @MATE_MIXER_CHANNEL_TOP_BACK_CENTER: 341 * Top back (rear) center channel. 342 */ 343 typedef enum { 344 MATE_MIXER_CHANNEL_UNKNOWN = 0, 345 MATE_MIXER_CHANNEL_MONO, 346 MATE_MIXER_CHANNEL_FRONT_LEFT, 347 MATE_MIXER_CHANNEL_FRONT_RIGHT, 348 MATE_MIXER_CHANNEL_FRONT_CENTER, 349 MATE_MIXER_CHANNEL_LFE, 350 MATE_MIXER_CHANNEL_BACK_LEFT, 351 MATE_MIXER_CHANNEL_BACK_RIGHT, 352 MATE_MIXER_CHANNEL_BACK_CENTER, 353 MATE_MIXER_CHANNEL_FRONT_LEFT_CENTER, 354 MATE_MIXER_CHANNEL_FRONT_RIGHT_CENTER, 355 MATE_MIXER_CHANNEL_SIDE_LEFT, 356 MATE_MIXER_CHANNEL_SIDE_RIGHT, 357 MATE_MIXER_CHANNEL_TOP_FRONT_LEFT, 358 MATE_MIXER_CHANNEL_TOP_FRONT_RIGHT, 359 MATE_MIXER_CHANNEL_TOP_FRONT_CENTER, 360 MATE_MIXER_CHANNEL_TOP_CENTER, 361 MATE_MIXER_CHANNEL_TOP_BACK_LEFT, 362 MATE_MIXER_CHANNEL_TOP_BACK_RIGHT, 363 MATE_MIXER_CHANNEL_TOP_BACK_CENTER, 364 /*< private >*/ 365 MATE_MIXER_CHANNEL_MAX 366 } MateMixerChannelPosition; 367 368 #endif /* MATEMIXER_ENUMS_H */ 369