AudioSystem.java revision 3a24199a0fe9479802ff6096d82cb3745efa1f1f
1/* 2 * Copyright (C) 2006 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.media; 18 19import java.util.ArrayList; 20 21/* IF YOU CHANGE ANY OF THE CONSTANTS IN THIS FILE, DO NOT FORGET 22 * TO UPDATE THE CORRESPONDING NATIVE GLUE AND AudioManager.java. 23 * THANK YOU FOR YOUR COOPERATION. 24 */ 25 26/** 27 * @hide 28 */ 29public class AudioSystem 30{ 31 /* These values must be kept in sync with AudioSystem.h */ 32 /* 33 * If these are modified, please also update Settings.System.VOLUME_SETTINGS 34 * and attrs.xml and AudioManager.java. 35 */ 36 /* The audio stream for phone calls */ 37 public static final int STREAM_VOICE_CALL = 0; 38 /* The audio stream for system sounds */ 39 public static final int STREAM_SYSTEM = 1; 40 /* The audio stream for the phone ring and message alerts */ 41 public static final int STREAM_RING = 2; 42 /* The audio stream for music playback */ 43 public static final int STREAM_MUSIC = 3; 44 /* The audio stream for alarms */ 45 public static final int STREAM_ALARM = 4; 46 /* The audio stream for notifications */ 47 public static final int STREAM_NOTIFICATION = 5; 48 /* @hide The audio stream for phone calls when connected on bluetooth */ 49 public static final int STREAM_BLUETOOTH_SCO = 6; 50 /* @hide The audio stream for enforced system sounds in certain countries (e.g camera in Japan) */ 51 public static final int STREAM_SYSTEM_ENFORCED = 7; 52 /* @hide The audio stream for DTMF tones */ 53 public static final int STREAM_DTMF = 8; 54 /* @hide The audio stream for text to speech (TTS) */ 55 public static final int STREAM_TTS = 9; 56 /** 57 * @deprecated Use {@link #numStreamTypes() instead} 58 */ 59 public static final int NUM_STREAMS = 5; 60 61 // Expose only the getter method publicly so we can change it in the future 62 private static final int NUM_STREAM_TYPES = 10; 63 public static final int getNumStreamTypes() { return NUM_STREAM_TYPES; } 64 65 /* 66 * Sets the microphone mute on or off. 67 * 68 * @param on set <var>true</var> to mute the microphone; 69 * <var>false</var> to turn mute off 70 * @return command completion status see AUDIO_STATUS_OK, see AUDIO_STATUS_ERROR 71 */ 72 public static native int muteMicrophone(boolean on); 73 74 /* 75 * Checks whether the microphone mute is on or off. 76 * 77 * @return true if microphone is muted, false if it's not 78 */ 79 public static native boolean isMicrophoneMuted(); 80 81 /* modes for setPhoneState, must match AudioSystem.h audio_mode */ 82 public static final int MODE_INVALID = -2; 83 public static final int MODE_CURRENT = -1; 84 public static final int MODE_NORMAL = 0; 85 public static final int MODE_RINGTONE = 1; 86 public static final int MODE_IN_CALL = 2; 87 public static final int MODE_IN_COMMUNICATION = 3; 88 public static final int NUM_MODES = 4; 89 90 91 /* Routing bits for the former setRouting/getRouting API */ 92 /** @deprecated */ 93 @Deprecated public static final int ROUTE_EARPIECE = (1 << 0); 94 /** @deprecated */ 95 @Deprecated public static final int ROUTE_SPEAKER = (1 << 1); 96 /** @deprecated use {@link #ROUTE_BLUETOOTH_SCO} */ 97 @Deprecated public static final int ROUTE_BLUETOOTH = (1 << 2); 98 /** @deprecated */ 99 @Deprecated public static final int ROUTE_BLUETOOTH_SCO = (1 << 2); 100 /** @deprecated */ 101 @Deprecated public static final int ROUTE_HEADSET = (1 << 3); 102 /** @deprecated */ 103 @Deprecated public static final int ROUTE_BLUETOOTH_A2DP = (1 << 4); 104 /** @deprecated */ 105 @Deprecated public static final int ROUTE_ALL = 0xFFFFFFFF; 106 107 // Keep in sync with system/core/include/system/audio.h 108 public static final int AUDIO_SESSION_ALLOCATE = 0; 109 110 /* 111 * Checks whether the specified stream type is active. 112 * 113 * return true if any track playing on this stream is active. 114 */ 115 public static native boolean isStreamActive(int stream, int inPastMs); 116 117 /* 118 * Checks whether the specified stream type is active on a remotely connected device. The notion 119 * of what constitutes a remote device is enforced by the audio policy manager of the platform. 120 * 121 * return true if any track playing on this stream is active on a remote device. 122 */ 123 public static native boolean isStreamActiveRemotely(int stream, int inPastMs); 124 125 /* 126 * Checks whether the specified audio source is active. 127 * 128 * return true if any recorder using this source is currently recording 129 */ 130 public static native boolean isSourceActive(int source); 131 132 /* 133 * Sets a group generic audio configuration parameters. The use of these parameters 134 * are platform dependent, see libaudio 135 * 136 * param keyValuePairs list of parameters key value pairs in the form: 137 * key1=value1;key2=value2;... 138 */ 139 public static native int setParameters(String keyValuePairs); 140 141 /* 142 * Gets a group generic audio configuration parameters. The use of these parameters 143 * are platform dependent, see libaudio 144 * 145 * param keys list of parameters 146 * return value: list of parameters key value pairs in the form: 147 * key1=value1;key2=value2;... 148 */ 149 public static native String getParameters(String keys); 150 151 // These match the enum AudioError in frameworks/base/core/jni/android_media_AudioSystem.cpp 152 /* Command sucessful or Media server restarted. see ErrorCallback */ 153 public static final int AUDIO_STATUS_OK = 0; 154 /* Command failed or unspecified audio error. see ErrorCallback */ 155 public static final int AUDIO_STATUS_ERROR = 1; 156 /* Media server died. see ErrorCallback */ 157 public static final int AUDIO_STATUS_SERVER_DIED = 100; 158 159 private static ErrorCallback mErrorCallback; 160 161 /* 162 * Handles the audio error callback. 163 */ 164 public interface ErrorCallback 165 { 166 /* 167 * Callback for audio server errors. 168 * param error error code: 169 * - AUDIO_STATUS_OK 170 * - AUDIO_STATUS_SERVER_DIED 171 * - AUDIO_STATUS_ERROR 172 */ 173 void onError(int error); 174 }; 175 176 /* 177 * Registers a callback to be invoked when an error occurs. 178 * @param cb the callback to run 179 */ 180 public static void setErrorCallback(ErrorCallback cb) 181 { 182 synchronized (AudioSystem.class) { 183 mErrorCallback = cb; 184 if (cb != null) { 185 cb.onError(checkAudioFlinger()); 186 } 187 } 188 } 189 190 private static void errorCallbackFromNative(int error) 191 { 192 ErrorCallback errorCallback = null; 193 synchronized (AudioSystem.class) { 194 if (mErrorCallback != null) { 195 errorCallback = mErrorCallback; 196 } 197 } 198 if (errorCallback != null) { 199 errorCallback.onError(error); 200 } 201 } 202 203 /* 204 * Error codes used by public APIs (AudioTrack, AudioRecord, AudioManager ...) 205 * Must be kept in sync with frameworks/base/core/jni/android_media_AudioErrors.h 206 */ 207 public static final int SUCCESS = 0; 208 public static final int ERROR = -1; 209 public static final int BAD_VALUE = -2; 210 public static final int INVALID_OPERATION = -3; 211 public static final int PERMISSION_DENIED = -4; 212 public static final int NO_INIT = -5; 213 public static final int DEAD_OBJECT = -6; 214 215 /* 216 * AudioPolicyService methods 217 */ 218 219 // 220 // audio device definitions: must be kept in sync with values in system/core/audio.h 221 // 222 223 // reserved bits 224 public static final int DEVICE_BIT_IN = 0x80000000; 225 public static final int DEVICE_BIT_DEFAULT = 0x40000000; 226 // output devices, be sure to update AudioManager.java also 227 public static final int DEVICE_OUT_EARPIECE = 0x1; 228 public static final int DEVICE_OUT_SPEAKER = 0x2; 229 public static final int DEVICE_OUT_WIRED_HEADSET = 0x4; 230 public static final int DEVICE_OUT_WIRED_HEADPHONE = 0x8; 231 public static final int DEVICE_OUT_BLUETOOTH_SCO = 0x10; 232 public static final int DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 0x20; 233 public static final int DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 0x40; 234 public static final int DEVICE_OUT_BLUETOOTH_A2DP = 0x80; 235 public static final int DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100; 236 public static final int DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200; 237 public static final int DEVICE_OUT_AUX_DIGITAL = 0x400; 238 public static final int DEVICE_OUT_HDMI = DEVICE_OUT_AUX_DIGITAL; 239 public static final int DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800; 240 public static final int DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000; 241 public static final int DEVICE_OUT_USB_ACCESSORY = 0x2000; 242 public static final int DEVICE_OUT_USB_DEVICE = 0x4000; 243 public static final int DEVICE_OUT_REMOTE_SUBMIX = 0x8000; 244 public static final int DEVICE_OUT_TELEPHONY_TX = 0x10000; 245 public static final int DEVICE_OUT_LINE = 0x20000; 246 public static final int DEVICE_OUT_HDMI_ARC = 0x40000; 247 public static final int DEVICE_OUT_SPDIF = 0x80000; 248 public static final int DEVICE_OUT_FM = 0x100000; 249 250 public static final int DEVICE_OUT_DEFAULT = DEVICE_BIT_DEFAULT; 251 252 public static final int DEVICE_OUT_ALL = (DEVICE_OUT_EARPIECE | 253 DEVICE_OUT_SPEAKER | 254 DEVICE_OUT_WIRED_HEADSET | 255 DEVICE_OUT_WIRED_HEADPHONE | 256 DEVICE_OUT_BLUETOOTH_SCO | 257 DEVICE_OUT_BLUETOOTH_SCO_HEADSET | 258 DEVICE_OUT_BLUETOOTH_SCO_CARKIT | 259 DEVICE_OUT_BLUETOOTH_A2DP | 260 DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | 261 DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | 262 DEVICE_OUT_HDMI | 263 DEVICE_OUT_ANLG_DOCK_HEADSET | 264 DEVICE_OUT_DGTL_DOCK_HEADSET | 265 DEVICE_OUT_USB_ACCESSORY | 266 DEVICE_OUT_USB_DEVICE | 267 DEVICE_OUT_REMOTE_SUBMIX | 268 DEVICE_OUT_TELEPHONY_TX | 269 DEVICE_OUT_LINE | 270 DEVICE_OUT_HDMI_ARC | 271 DEVICE_OUT_SPDIF | 272 DEVICE_OUT_FM | 273 DEVICE_OUT_DEFAULT); 274 public static final int DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP | 275 DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | 276 DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER); 277 public static final int DEVICE_OUT_ALL_SCO = (DEVICE_OUT_BLUETOOTH_SCO | 278 DEVICE_OUT_BLUETOOTH_SCO_HEADSET | 279 DEVICE_OUT_BLUETOOTH_SCO_CARKIT); 280 public static final int DEVICE_OUT_ALL_USB = (DEVICE_OUT_USB_ACCESSORY | 281 DEVICE_OUT_USB_DEVICE); 282 283 // input devices 284 public static final int DEVICE_IN_COMMUNICATION = DEVICE_BIT_IN | 0x1; 285 public static final int DEVICE_IN_AMBIENT = DEVICE_BIT_IN | 0x2; 286 public static final int DEVICE_IN_BUILTIN_MIC = DEVICE_BIT_IN | 0x4; 287 public static final int DEVICE_IN_BLUETOOTH_SCO_HEADSET = DEVICE_BIT_IN | 0x8; 288 public static final int DEVICE_IN_WIRED_HEADSET = DEVICE_BIT_IN | 0x10; 289 public static final int DEVICE_IN_AUX_DIGITAL = DEVICE_BIT_IN | 0x20; 290 public static final int DEVICE_IN_HDMI = DEVICE_IN_AUX_DIGITAL; 291 public static final int DEVICE_IN_VOICE_CALL = DEVICE_BIT_IN | 0x40; 292 public static final int DEVICE_IN_TELEPHONY_RX = DEVICE_IN_VOICE_CALL; 293 public static final int DEVICE_IN_BACK_MIC = DEVICE_BIT_IN | 0x80; 294 public static final int DEVICE_IN_REMOTE_SUBMIX = DEVICE_BIT_IN | 0x100; 295 public static final int DEVICE_IN_ANLG_DOCK_HEADSET = DEVICE_BIT_IN | 0x200; 296 public static final int DEVICE_IN_DGTL_DOCK_HEADSET = DEVICE_BIT_IN | 0x400; 297 public static final int DEVICE_IN_USB_ACCESSORY = DEVICE_BIT_IN | 0x800; 298 public static final int DEVICE_IN_USB_DEVICE = DEVICE_BIT_IN | 0x1000; 299 public static final int DEVICE_IN_FM_TUNER = DEVICE_BIT_IN | 0x2000; 300 public static final int DEVICE_IN_TV_TUNER = DEVICE_BIT_IN | 0x4000; 301 public static final int DEVICE_IN_LINE = DEVICE_BIT_IN | 0x8000; 302 public static final int DEVICE_IN_SPDIF = DEVICE_BIT_IN | 0x10000; 303 304 public static final int DEVICE_IN_DEFAULT = DEVICE_BIT_IN | DEVICE_BIT_DEFAULT; 305 306 public static final int DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION | 307 DEVICE_IN_AMBIENT | 308 DEVICE_IN_BUILTIN_MIC | 309 DEVICE_IN_BLUETOOTH_SCO_HEADSET | 310 DEVICE_IN_WIRED_HEADSET | 311 DEVICE_IN_HDMI | 312 DEVICE_IN_TELEPHONY_RX | 313 DEVICE_IN_BACK_MIC | 314 DEVICE_IN_REMOTE_SUBMIX | 315 DEVICE_IN_ANLG_DOCK_HEADSET | 316 DEVICE_IN_DGTL_DOCK_HEADSET | 317 DEVICE_IN_USB_ACCESSORY | 318 DEVICE_IN_USB_DEVICE | 319 DEVICE_IN_FM_TUNER | 320 DEVICE_IN_TV_TUNER | 321 DEVICE_IN_LINE | 322 DEVICE_IN_SPDIF | 323 DEVICE_IN_DEFAULT); 324 public static final int DEVICE_IN_ALL_SCO = DEVICE_IN_BLUETOOTH_SCO_HEADSET; 325 public static final int DEVICE_IN_ALL_USB = (DEVICE_IN_USB_ACCESSORY | 326 DEVICE_IN_USB_DEVICE); 327 328 // device states, must match AudioSystem::device_connection_state 329 public static final int DEVICE_STATE_UNAVAILABLE = 0; 330 public static final int DEVICE_STATE_AVAILABLE = 1; 331 private static final int NUM_DEVICE_STATES = 1; 332 333 public static final String DEVICE_OUT_EARPIECE_NAME = "earpiece"; 334 public static final String DEVICE_OUT_SPEAKER_NAME = "speaker"; 335 public static final String DEVICE_OUT_WIRED_HEADSET_NAME = "headset"; 336 public static final String DEVICE_OUT_WIRED_HEADPHONE_NAME = "headphone"; 337 public static final String DEVICE_OUT_BLUETOOTH_SCO_NAME = "bt_sco"; 338 public static final String DEVICE_OUT_BLUETOOTH_SCO_HEADSET_NAME = "bt_sco_hs"; 339 public static final String DEVICE_OUT_BLUETOOTH_SCO_CARKIT_NAME = "bt_sco_carkit"; 340 public static final String DEVICE_OUT_BLUETOOTH_A2DP_NAME = "bt_a2dp"; 341 public static final String DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES_NAME = "bt_a2dp_hp"; 342 public static final String DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER_NAME = "bt_a2dp_spk"; 343 public static final String DEVICE_OUT_AUX_DIGITAL_NAME = "aux_digital"; 344 public static final String DEVICE_OUT_HDMI_NAME = "hdmi"; 345 public static final String DEVICE_OUT_ANLG_DOCK_HEADSET_NAME = "analog_dock"; 346 public static final String DEVICE_OUT_DGTL_DOCK_HEADSET_NAME = "digital_dock"; 347 public static final String DEVICE_OUT_USB_ACCESSORY_NAME = "usb_accessory"; 348 public static final String DEVICE_OUT_USB_DEVICE_NAME = "usb_device"; 349 public static final String DEVICE_OUT_REMOTE_SUBMIX_NAME = "remote_submix"; 350 public static final String DEVICE_OUT_TELEPHONY_TX_NAME = "telephony_tx"; 351 public static final String DEVICE_OUT_LINE_NAME = "line"; 352 public static final String DEVICE_OUT_HDMI_ARC_NAME = "hmdi_arc"; 353 public static final String DEVICE_OUT_SPDIF_NAME = "spdif"; 354 public static final String DEVICE_OUT_FM_NAME = "fm_transmitter"; 355 356 public static String getOutputDeviceName(int device) 357 { 358 switch(device) { 359 case DEVICE_OUT_EARPIECE: 360 return DEVICE_OUT_EARPIECE_NAME; 361 case DEVICE_OUT_SPEAKER: 362 return DEVICE_OUT_SPEAKER_NAME; 363 case DEVICE_OUT_WIRED_HEADSET: 364 return DEVICE_OUT_WIRED_HEADSET_NAME; 365 case DEVICE_OUT_WIRED_HEADPHONE: 366 return DEVICE_OUT_WIRED_HEADPHONE_NAME; 367 case DEVICE_OUT_BLUETOOTH_SCO: 368 return DEVICE_OUT_BLUETOOTH_SCO_NAME; 369 case DEVICE_OUT_BLUETOOTH_SCO_HEADSET: 370 return DEVICE_OUT_BLUETOOTH_SCO_HEADSET_NAME; 371 case DEVICE_OUT_BLUETOOTH_SCO_CARKIT: 372 return DEVICE_OUT_BLUETOOTH_SCO_CARKIT_NAME; 373 case DEVICE_OUT_BLUETOOTH_A2DP: 374 return DEVICE_OUT_BLUETOOTH_A2DP_NAME; 375 case DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES: 376 return DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES_NAME; 377 case DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER: 378 return DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER_NAME; 379 case DEVICE_OUT_HDMI: 380 return DEVICE_OUT_HDMI_NAME; 381 case DEVICE_OUT_ANLG_DOCK_HEADSET: 382 return DEVICE_OUT_ANLG_DOCK_HEADSET_NAME; 383 case DEVICE_OUT_DGTL_DOCK_HEADSET: 384 return DEVICE_OUT_DGTL_DOCK_HEADSET_NAME; 385 case DEVICE_OUT_USB_ACCESSORY: 386 return DEVICE_OUT_USB_ACCESSORY_NAME; 387 case DEVICE_OUT_USB_DEVICE: 388 return DEVICE_OUT_USB_DEVICE_NAME; 389 case DEVICE_OUT_REMOTE_SUBMIX: 390 return DEVICE_OUT_REMOTE_SUBMIX_NAME; 391 case DEVICE_OUT_TELEPHONY_TX: 392 return DEVICE_OUT_TELEPHONY_TX_NAME; 393 case DEVICE_OUT_LINE: 394 return DEVICE_OUT_LINE_NAME; 395 case DEVICE_OUT_HDMI_ARC: 396 return DEVICE_OUT_HDMI_ARC_NAME; 397 case DEVICE_OUT_SPDIF: 398 return DEVICE_OUT_SPDIF_NAME; 399 case DEVICE_OUT_FM: 400 return DEVICE_OUT_FM_NAME; 401 case DEVICE_OUT_DEFAULT: 402 default: 403 return ""; 404 } 405 } 406 407 408 // phone state, match audio_mode??? 409 public static final int PHONE_STATE_OFFCALL = 0; 410 public static final int PHONE_STATE_RINGING = 1; 411 public static final int PHONE_STATE_INCALL = 2; 412 413 // device categories config for setForceUse, must match AudioSystem::forced_config 414 public static final int FORCE_NONE = 0; 415 public static final int FORCE_SPEAKER = 1; 416 public static final int FORCE_HEADPHONES = 2; 417 public static final int FORCE_BT_SCO = 3; 418 public static final int FORCE_BT_A2DP = 4; 419 public static final int FORCE_WIRED_ACCESSORY = 5; 420 public static final int FORCE_BT_CAR_DOCK = 6; 421 public static final int FORCE_BT_DESK_DOCK = 7; 422 public static final int FORCE_ANALOG_DOCK = 8; 423 public static final int FORCE_DIGITAL_DOCK = 9; 424 public static final int FORCE_NO_BT_A2DP = 10; 425 public static final int FORCE_SYSTEM_ENFORCED = 11; 426 private static final int NUM_FORCE_CONFIG = 12; 427 public static final int FORCE_DEFAULT = FORCE_NONE; 428 429 // usage for setForceUse, must match AudioSystem::force_use 430 public static final int FOR_COMMUNICATION = 0; 431 public static final int FOR_MEDIA = 1; 432 public static final int FOR_RECORD = 2; 433 public static final int FOR_DOCK = 3; 434 public static final int FOR_SYSTEM = 4; 435 private static final int NUM_FORCE_USE = 5; 436 437 // usage for AudioRecord.startRecordingSync(), must match AudioSystem::sync_event_t 438 public static final int SYNC_EVENT_NONE = 0; 439 public static final int SYNC_EVENT_PRESENTATION_COMPLETE = 1; 440 441 public static native int setDeviceConnectionState(int device, int state, String device_address); 442 public static native int getDeviceConnectionState(int device, String device_address); 443 public static native int setPhoneState(int state); 444 public static native int setForceUse(int usage, int config); 445 public static native int getForceUse(int usage); 446 public static native int initStreamVolume(int stream, int indexMin, int indexMax); 447 public static native int setStreamVolumeIndex(int stream, int index, int device); 448 public static native int getStreamVolumeIndex(int stream, int device); 449 public static native int setMasterVolume(float value); 450 public static native float getMasterVolume(); 451 public static native int setMasterMute(boolean mute); 452 public static native boolean getMasterMute(); 453 public static native int getDevicesForStream(int stream); 454 455 // helpers for android.media.AudioManager.getProperty(), see description there for meaning 456 public static native int getPrimaryOutputSamplingRate(); 457 public static native int getPrimaryOutputFrameCount(); 458 public static native int getOutputLatency(int stream); 459 460 public static native int setLowRamDevice(boolean isLowRamDevice); 461 public static native int checkAudioFlinger(); 462 463 public static native int listAudioPorts(ArrayList<AudioPort> ports, int[] generation); 464 public static native int createAudioPatch(AudioPatch[] patch, 465 AudioPortConfig[] sources, AudioPortConfig[] sinks); 466 public static native int releaseAudioPatch(AudioPatch patch); 467 public static native int listAudioPatches(ArrayList<AudioPatch> patches, int[] generation); 468 public static native int setAudioPortConfig(AudioPortConfig config); 469} 470 471