/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowAudioManagerTest.java | 21 private final AudioManager audioManager = field in ShadowAudioManagerTest 31 assertThat(shadowOf(audioManager).getLastAudioFocusRequest()).isNull(); in requestAudioFocus_shouldRecordArgumentsOfMostRecentCall() 32 audioManager.requestAudioFocus(listener, 999, 888); in requestAudioFocus_shouldRecordArgumentsOfMostRecentCall() 33 … assertThat(shadowOf(audioManager).getLastAudioFocusRequest().listener).isSameInstanceAs(listener); in requestAudioFocus_shouldRecordArgumentsOfMostRecentCall() 34 assertThat(shadowOf(audioManager).getLastAudioFocusRequest().streamType).isEqualTo(999); in requestAudioFocus_shouldRecordArgumentsOfMostRecentCall() 35 assertThat(shadowOf(audioManager).getLastAudioFocusRequest().durationHint).isEqualTo(888); in requestAudioFocus_shouldRecordArgumentsOfMostRecentCall() 36 assertThat(shadowOf(audioManager).getLastAudioFocusRequest().audioFocusRequest).isNull(); in requestAudioFocus_shouldRecordArgumentsOfMostRecentCall() 41 int value = audioManager.requestAudioFocus(listener, 999, 888); in requestAudioFocus_shouldReturnTheSpecifiedValue() 44 shadowOf(audioManager).setNextFocusRequestResponse(AudioManager.AUDIOFOCUS_REQUEST_FAILED); in requestAudioFocus_shouldReturnTheSpecifiedValue() 46 value = audioManager.requestAudioFocus(listener, 999, 888); in requestAudioFocus_shouldReturnTheSpecifiedValue() [all …]
|
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/ |
D | AudioFocusManagerTest.java | 52 private AudioManager audioManager; field in AudioFocusManagerTest 56 audioManager = in setUp() 77 Shadows.shadowOf(audioManager).getLastAudioFocusRequest(); in setAudioAttributes_withNullUsage_doesNotManageAudioFocus() 84 Shadows.shadowOf(audioManager) in setAudioAttributes_withNullUsage_abandonsAudioFocus() 91 Shadows.shadowOf(audioManager).getLastAudioFocusRequest(); in setAudioAttributes_withNullUsage_abandonsAudioFocus() 100 Shadows.shadowOf(audioManager).getLastAbandonedAudioFocusListener(); in setAudioAttributes_withNullUsage_abandonsAudioFocus() 107 Shadows.shadowOf(audioManager) in setAudioAttributes_withNullUsage_abandonsAudioFocus_v26() 114 Shadows.shadowOf(audioManager).getLastAudioFocusRequest(); in setAudioAttributes_withNullUsage_abandonsAudioFocus_v26() 122 Shadows.shadowOf(audioManager).getLastAbandonedAudioFocusRequest(); in setAudioAttributes_withNullUsage_abandonsAudioFocus_v26() 140 Shadows.shadowOf(audioManager) in setAudioAttributes_withUsageMedia_usesAudioFocusGain() [all …]
|
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/ |
D | StreamVolumeManager.java | 50 private final AudioManager audioManager; field in StreamVolumeManager 63 audioManager = in StreamVolumeManager() 68 volume = getVolumeFromManager(audioManager, streamType); in StreamVolumeManager() 69 muted = getMutedFromManager(audioManager, streamType); in StreamVolumeManager() 92 return Util.SDK_INT >= 28 ? audioManager.getStreamMinVolume(streamType) : 0; in getMinVolume() 100 return audioManager.getStreamMaxVolume(streamType); in getMaxVolume() 121 audioManager.setStreamVolume(streamType, volume, VOLUME_FLAGS); in setVolume() 133 audioManager.adjustStreamVolume(streamType, AudioManager.ADJUST_RAISE, VOLUME_FLAGS); in increaseVolume() 145 audioManager.adjustStreamVolume(streamType, AudioManager.ADJUST_LOWER, VOLUME_FLAGS); in decreaseVolume() 152 audioManager.adjustStreamVolume( in setMuted() [all …]
|
D | AudioFocusManager.java | 98 private final AudioManager audioManager; field in AudioFocusManager 118 this.audioManager = in AudioFocusManager() 213 return audioManager.requestAudioFocus( in requestAudioFocusDefault() 237 return audioManager.requestAudioFocus(audioFocusRequest); in requestAudioFocusV26() 241 audioManager.abandonAudioFocus(focusListener); in abandonAudioFocusDefault() 247 audioManager.abandonAudioFocusRequest(audioFocusRequest); in abandonAudioFocusV26()
|
/external/webrtc/sdk/android/src/java/org/webrtc/audio/ |
D | WebRtcAudioUtils.java | 61 static void logAudioState(String tag, Context context, AudioManager audioManager) { in logAudioState() argument 63 logAudioStateBasic(tag, context, audioManager); in logAudioState() 64 logAudioStateVolume(tag, audioManager); in logAudioState() 65 logAudioDeviceInfo(tag, audioManager); in logAudioState() 193 private static void logAudioStateBasic(String tag, Context context, AudioManager audioManager) { in logAudioStateBasic() argument 196 + "audio mode: " + modeToString(audioManager.getMode()) + ", " in logAudioStateBasic() 198 + "mic muted: " + audioManager.isMicrophoneMute() + ", " in logAudioStateBasic() 199 + "music active: " + audioManager.isMusicActive() + ", " in logAudioStateBasic() 200 + "speakerphone: " + audioManager.isSpeakerphoneOn() + ", " in logAudioStateBasic() 201 + "BT SCO: " + audioManager.isBluetoothScoOn()); in logAudioStateBasic() [all …]
|
D | VolumeLogger.java | 31 private final AudioManager audioManager; field in VolumeLogger 34 public VolumeLogger(AudioManager audioManager) { in VolumeLogger() argument 35 this.audioManager = audioManager; in VolumeLogger() 43 Logging.d(TAG, "audio mode is: " + WebRtcAudioUtils.modeToString(audioManager.getMode())); in start() 46 timer.schedule(new LogVolumeTask(audioManager.getStreamMaxVolume(AudioManager.STREAM_RING), in start() 47 audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL)), in start() 62 final int mode = audioManager.getMode(); in run() 65 "STREAM_RING stream volume: " + audioManager.getStreamVolume(AudioManager.STREAM_RING) in run() 70 + audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL) in run()
|
D | WebRtcAudioManager.java | 44 Context context, AudioManager audioManager, int sampleRate, int numberOfOutputChannels) { in getOutputBufferSize() argument 46 ? getLowLatencyFramesPerBuffer(audioManager) in getOutputBufferSize() 52 Context context, AudioManager audioManager, int sampleRate, int numberOfInputChannels) { in getInputBufferSize() argument 54 ? getLowLatencyFramesPerBuffer(audioManager) in getInputBufferSize() 74 static int getSampleRate(AudioManager audioManager) { in getSampleRate() argument 82 final int sampleRateHz = getSampleRateForApiLevel(audioManager); in getSampleRate() 87 private static int getSampleRateForApiLevel(AudioManager audioManager) { in getSampleRateForApiLevel() argument 91 String sampleRateString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in getSampleRateForApiLevel() 96 private static int getLowLatencyFramesPerBuffer(AudioManager audioManager) { in getLowLatencyFramesPerBuffer() argument 101 audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in getLowLatencyFramesPerBuffer()
|
D | WebRtcAudioTrack.java | 69 private final AudioManager audioManager; field in WebRtcAudioTrack 164 WebRtcAudioTrack(Context context, AudioManager audioManager) { in WebRtcAudioTrack() argument 165 this(context, audioManager, null /* errorCallback */, null /* stateCallback */); in WebRtcAudioTrack() 168 WebRtcAudioTrack(Context context, AudioManager audioManager, in WebRtcAudioTrack() argument 173 this.audioManager = audioManager; in WebRtcAudioTrack() 176 this.volumeLogger = new VolumeLogger(audioManager); in WebRtcAudioTrack() 305 WebRtcAudioUtils.logAudioState(TAG, context, audioManager); in stopPlayout() 328 return audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL); in getStreamMaxVolume() 340 audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, volume, 0); in setStreamVolume() 347 return audioManager.isVolumeFixed(); in isVolumeFixed() [all …]
|
D | WebRtcAudioRecord.java | 79 private final AudioManager audioManager; field in WebRtcAudioRecord 181 WebRtcAudioRecord(Context context, AudioManager audioManager) { in WebRtcAudioRecord() argument 182 this(context, audioManager, DEFAULT_AUDIO_SOURCE, DEFAULT_AUDIO_FORMAT, in WebRtcAudioRecord() 188 public WebRtcAudioRecord(Context context, AudioManager audioManager, int audioSource, in WebRtcAudioRecord() argument 200 this.audioManager = audioManager; in WebRtcAudioRecord() 396 WebRtcAudioUtils.logAudioState(TAG, context, audioManager); in stopRecording() 456 List<AudioRecordingConfiguration> configs = audioManager.getActiveRecordingConfigurations(); in logRecordingConfigurations() 508 WebRtcAudioUtils.logAudioState(TAG, context, audioManager); in reportWebRtcAudioRecordInitError() 518 WebRtcAudioUtils.logAudioState(TAG, context, audioManager); in reportWebRtcAudioRecordStartError() 527 WebRtcAudioUtils.logAudioState(TAG, context, audioManager); in reportWebRtcAudioRecordError()
|
/external/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/ |
D | WebRtcAudioUtils.java | 199 final AudioManager audioManager = in logAudioState() local 201 logAudioStateBasic(tag, audioManager); in logAudioState() 202 logAudioStateVolume(tag, audioManager); in logAudioState() 203 logAudioDeviceInfo(tag, audioManager); in logAudioState() 207 private static void logAudioStateBasic(String tag, AudioManager audioManager) { in logAudioStateBasic() argument 209 + "audio mode: " + modeToString(audioManager.getMode()) + ", " in logAudioStateBasic() 211 + "mic muted: " + audioManager.isMicrophoneMute() + ", " in logAudioStateBasic() 212 + "music active: " + audioManager.isMusicActive() + ", " in logAudioStateBasic() 213 + "speakerphone: " + audioManager.isSpeakerphoneOn() + ", " in logAudioStateBasic() 214 + "BT SCO: " + audioManager.isBluetoothScoOn()); in logAudioStateBasic() [all …]
|
D | WebRtcAudioManager.java | 104 private final AudioManager audioManager; field in WebRtcAudioManager.VolumeLogger 107 public VolumeLogger(AudioManager audioManager) { in VolumeLogger() argument 108 this.audioManager = audioManager; in VolumeLogger() 113 timer.schedule(new LogVolumeTask(audioManager.getStreamMaxVolume(AudioManager.STREAM_RING), in start() 114 audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL)), in start() 129 final int mode = audioManager.getMode(); in run() 132 + audioManager.getStreamVolume(AudioManager.STREAM_RING) + " (max=" in run() 136 + audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL) + " (max=" in run() 151 private final AudioManager audioManager; field in WebRtcAudioManager 175 audioManager = in WebRtcAudioManager() [all …]
|
D | WebRtcAudioTrack.java | 73 private final AudioManager audioManager; field in WebRtcAudioTrack 211 audioManager = in WebRtcAudioTrack() 347 assertTrue(audioManager != null); in getStreamMaxVolume() 348 return audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL); in getStreamMaxVolume() 355 assertTrue(audioManager != null); in setStreamVolume() 360 audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, volume, 0); in setStreamVolume() 367 return audioManager.isVolumeFixed(); in isVolumeFixed() 374 assertTrue(audioManager != null); in getStreamVolume() 375 return audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL); in getStreamVolume()
|
/external/webrtc/sdk/android/api/org/webrtc/audio/ |
D | JavaAudioDeviceModule.java | 34 private final AudioManager audioManager; field in JavaAudioDeviceModule.Builder 51 this.audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in Builder() 52 this.inputSampleRate = WebRtcAudioManager.getSampleRate(audioManager); in Builder() 53 this.outputSampleRate = WebRtcAudioManager.getSampleRate(audioManager); in Builder() 211 final WebRtcAudioRecord audioInput = new WebRtcAudioRecord(context, audioManager, audioSource, in createAudioDeviceModule() 215 context, audioManager, audioTrackErrorCallback, audioTrackStateCallback); in createAudioDeviceModule() 216 return new JavaAudioDeviceModule(context, audioManager, audioInput, audioOutput, in createAudioDeviceModule() 318 private final AudioManager audioManager; field in JavaAudioDeviceModule 329 private JavaAudioDeviceModule(Context context, AudioManager audioManager, in JavaAudioDeviceModule() argument 333 this.audioManager = audioManager; in JavaAudioDeviceModule() [all …]
|
/external/webrtc/examples/androidapp/src/org/appspot/apprtc/ |
D | AppRTCAudioManager.java | 62 private AudioManager audioManager; field in AppRTCAudioManager 168 audioManager = ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE)); in AppRTCAudioManager() 211 savedAudioMode = audioManager.getMode(); in start() 212 savedIsSpeakerPhoneOn = audioManager.isSpeakerphoneOn(); in start() 213 savedIsMicrophoneMute = audioManager.isMicrophoneMute(); in start() 258 int result = audioManager.requestAudioFocus(audioFocusChangeListener, in start() 269 audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in start() 311 audioManager.setMode(savedAudioMode); in stop() 314 audioManager.abandonAudioFocus(audioFocusChangeListener); in stop() 411 boolean wasOn = audioManager.isSpeakerphoneOn(); in setSpeakerphoneOn() [all …]
|
D | AppRTCBluetoothManager.java | 69 private final AudioManager audioManager; field in AppRTCBluetoothManager 198 static AppRTCBluetoothManager create(Context context, AppRTCAudioManager audioManager) { in create() argument 200 return new AppRTCBluetoothManager(context, audioManager); in create() 203 protected AppRTCBluetoothManager(Context context, AppRTCAudioManager audioManager) { in AppRTCBluetoothManager() argument 207 apprtcAudioManager = audioManager; in AppRTCBluetoothManager() 208 this.audioManager = getAudioManager(context); in AppRTCBluetoothManager() 255 if (!audioManager.isBluetoothScoAvailableOffCall()) { in start() 338 audioManager.startBluetoothSco(); in startScoAudio() 339 audioManager.setBluetoothScoOn(true); in startScoAudio() 356 audioManager.stopBluetoothSco(); in stopScoAudio() [all …]
|
D | CallActivity.java | 158 @Nullable private AppRTCAudioManager audioManager; field in CallActivity 583 audioManager = AppRTCAudioManager.create(getApplicationContext()); 587 audioManager.start(new AudioManagerEvents() { 645 if (audioManager != null) { 646 audioManager.stop(); 647 audioManager = null;
|
/external/exoplayer/tree/library/core/src/androidTest/java/com/google/android/exoplayer2/ |
D | StreamVolumeManagerTest.java | 42 private AudioManager audioManager; field in StreamVolumeManagerTest 51 audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in setUp() 72 int streamMinVolume = audioManager.getStreamMinVolume(C.STREAM_TYPE_DEFAULT); in getMinVolume_returnsStreamMinVolume() 81 int streamMaxVolume = audioManager.getStreamMaxVolume(C.STREAM_TYPE_DEFAULT); in getMaxVolume_returnsStreamMaxVolume() 90 int streamVolume = audioManager.getStreamVolume(C.STREAM_TYPE_DEFAULT); in getVolume_returnsStreamVolume() 112 assertThat(audioManager.getStreamVolume(C.STREAM_TYPE_DEFAULT)).isEqualTo(targetVolume); in setVolume_changesStreamVolume() 149 assertThat(audioManager.getStreamVolume(C.STREAM_TYPE_DEFAULT)).isEqualTo(targetVolume); in increaseVolume_increasesStreamVolumeByOne() 183 assertThat(audioManager.getStreamVolume(C.STREAM_TYPE_DEFAULT)).isEqualTo(targetVolume); in decreaseVolume_decreasesStreamVolumeByOne() 235 int testStreamVolume = audioManager.getStreamVolume(testStreamType); in setStreamType_notifiesStreamTypeAndVolume() 266 audioManager.setStreamVolume(C.STREAM_TYPE_DEFAULT, targetVolume, /* flags= */ 0); in onStreamVolumeChanged_isCalled_whenAudioManagerChangesIt()
|
/external/oboe/docs/notes/ |
D | effects.md | 31 AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); 32 int audioSessionId = audioManager.generateAudioSessionId();
|
/external/oboe/apps/OboeTester/app/src/main/java/com/google/sample/oboe/manualtest/ |
D | TestAudioActivity.java | 433 AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in isScoDevice() 434 final AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL); in isScoDevice()
|