Home
last modified time | relevance | path

Searched refs:AudioManager (Results 1 – 25 of 91) sorted by relevance

1234

/external/webrtc/modules/audio_device/android/
Daudio_manager.cc25 AudioManager::JavaAudioManager::JavaAudioManager( in JavaAudioManager()
39 AudioManager::JavaAudioManager::~JavaAudioManager() { in ~JavaAudioManager()
43 bool AudioManager::JavaAudioManager::Init() { in Init()
47 void AudioManager::JavaAudioManager::Close() { in Close()
51 bool AudioManager::JavaAudioManager::IsCommunicationModeEnabled() { in IsCommunicationModeEnabled()
55 bool AudioManager::JavaAudioManager::IsDeviceBlacklistedForOpenSLESUsage() { in IsDeviceBlacklistedForOpenSLESUsage()
61 AudioManager::AudioManager() in AudioManager() function in webrtc::AudioManager
75 reinterpret_cast<void*>(&webrtc::AudioManager::CacheAudioParameters)}}; in AudioManager()
85 AudioManager::~AudioManager() { in ~AudioManager()
91 void AudioManager::SetActiveAudioLayer( in SetActiveAudioLayer()
[all …]
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowAudioManagerTest.java9 import android.media.AudioManager;
21 private final AudioManager audioManager =
22 new AudioManager((Application) ApplicationProvider.getApplicationContext());
23 …private final AudioManager.OnAudioFocusChangeListener listener = new AudioManager.OnAudioFocusChan…
42 assertThat(value).isEqualTo(AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in requestAudioFocus_shouldReturnTheSpecifiedValue()
44 shadowOf(audioManager).setNextFocusRequestResponse(AudioManager.AUDIOFOCUS_REQUEST_FAILED); in requestAudioFocus_shouldReturnTheSpecifiedValue()
47 assertThat(value).isEqualTo(AudioManager.AUDIOFOCUS_REQUEST_FAILED); in requestAudioFocus_shouldReturnTheSpecifiedValue()
57 new android.media.AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN) in requestAudioFocus2_shouldRecordArgumentsOfMostRecentCall()
74 new android.media.AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN).build()); in requestAudioFocus2_shouldReturnTheSpecifiedValue()
75 assertThat(value).isEqualTo(AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in requestAudioFocus2_shouldReturnTheSpecifiedValue()
[all …]
/external/webrtc/sdk/android/src/java/org/webrtc/audio/
DWebRtcAudioUtils.java13 import static android.media.AudioManager.MODE_IN_CALL;
14 import static android.media.AudioManager.MODE_IN_COMMUNICATION;
15 import static android.media.AudioManager.MODE_NORMAL;
16 import static android.media.AudioManager.MODE_RINGTONE;
23 import android.media.AudioManager;
61 static void logAudioState(String tag, Context context, AudioManager audioManager) { in logAudioState()
193 private static void logAudioStateBasic(String tag, Context context, AudioManager audioManager) { in logAudioStateBasic()
204 private static boolean isVolumeFixed(AudioManager audioManager) { in isVolumeFixed()
212 private static void logAudioStateVolume(String tag, AudioManager audioManager) { in logAudioStateVolume()
213 final int[] streams = {AudioManager.STREAM_VOICE_CALL, AudioManager.STREAM_MUSIC, in logAudioStateVolume()
[all …]
DVolumeLogger.java13 import android.media.AudioManager;
31 private final AudioManager audioManager;
34 public VolumeLogger(AudioManager audioManager) { in VolumeLogger()
46 timer.schedule(new LogVolumeTask(audioManager.getStreamMaxVolume(AudioManager.STREAM_RING), in start()
47 audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL)), in start()
63 if (mode == AudioManager.MODE_RINGTONE) { in run()
65 "STREAM_RING stream volume: " + audioManager.getStreamVolume(AudioManager.STREAM_RING) in run()
67 } else if (mode == AudioManager.MODE_IN_COMMUNICATION) { in run()
70 + audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL) in run()
DWebRtcAudioManager.java16 import android.media.AudioManager;
38 static AudioManager getAudioManager(Context context) { in getAudioManager()
39 return (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in getAudioManager()
44 Context context, AudioManager audioManager, int sampleRate, int numberOfOutputChannels) { in getOutputBufferSize()
52 Context context, AudioManager audioManager, int sampleRate, int numberOfInputChannels) { in getInputBufferSize()
74 static int getSampleRate(AudioManager audioManager) { in getSampleRate()
87 private static int getSampleRateForApiLevel(AudioManager audioManager) { in getSampleRateForApiLevel()
91 String sampleRateString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in getSampleRateForApiLevel()
96 private static int getLowLatencyFramesPerBuffer(AudioManager audioManager) { in getLowLatencyFramesPerBuffer()
101 audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in getLowLatencyFramesPerBuffer()
/external/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/
DWebRtcAudioUtils.java13 import static android.media.AudioManager.MODE_IN_CALL;
14 import static android.media.AudioManager.MODE_IN_COMMUNICATION;
15 import static android.media.AudioManager.MODE_NORMAL;
16 import static android.media.AudioManager.MODE_RINGTONE;
21 import android.media.AudioManager;
199 final AudioManager audioManager = in logAudioState()
200 (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in logAudioState()
207 private static void logAudioStateBasic(String tag, AudioManager audioManager) { in logAudioStateBasic()
217 private static boolean isVolumeFixed(AudioManager audioManager) { in isVolumeFixed()
225 private static void logAudioStateVolume(String tag, AudioManager audioManager) { in logAudioStateVolume()
[all …]
DWebRtcAudioManager.java16 import android.media.AudioManager;
104 private final AudioManager audioManager;
107 public VolumeLogger(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()
130 if (mode == AudioManager.MODE_RINGTONE) { in run()
132 + audioManager.getStreamVolume(AudioManager.STREAM_RING) + " (max=" in run()
134 } else if (mode == AudioManager.MODE_IN_COMMUNICATION) { in run()
136 + audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL) + " (max=" in run()
151 private final AudioManager audioManager;
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowAudioManager.java7 import android.media.AudioManager;
21 @Implements(AudioManager.class)
29 AudioManager.STREAM_MUSIC,
30 AudioManager.STREAM_ALARM,
31 AudioManager.STREAM_NOTIFICATION,
32 AudioManager.STREAM_RING,
33 AudioManager.STREAM_SYSTEM,
34 AudioManager.STREAM_VOICE_CALL,
35 AudioManager.STREAM_DTMF
39 private int nextResponseValue = AudioManager.AUDIOFOCUS_REQUEST_GRANTED;
[all …]
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/
DAudioFocusManagerTest.java28 import android.media.AudioManager;
52 private AudioManager audioManager;
57 (AudioManager) in setUp()
85 .setNextFocusRequestResponse(AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in setAudioAttributes_withNullUsage_abandonsAudioFocus()
92 assertThat(request.durationHint).isEqualTo(AudioManager.AUDIOFOCUS_GAIN); in setAudioAttributes_withNullUsage_abandonsAudioFocus()
99 AudioManager.OnAudioFocusChangeListener lastRequest = in setAudioAttributes_withNullUsage_abandonsAudioFocus()
108 .setNextFocusRequestResponse(AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in setAudioAttributes_withNullUsage_abandonsAudioFocus_v26()
115 assertThat(getAudioFocusGainFromRequest(request)).isEqualTo(AudioManager.AUDIOFOCUS_GAIN); in setAudioAttributes_withNullUsage_abandonsAudioFocus_v26()
141 .setNextFocusRequestResponse(AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in setAudioAttributes_withUsageMedia_usesAudioFocusGain()
151 assertThat(getAudioFocusGainFromRequest(request)).isEqualTo(AudioManager.AUDIOFOCUS_GAIN); in setAudioAttributes_withUsageMedia_usesAudioFocusGain()
[all …]
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/media/
DAudioManagerFacade.java21 import android.media.AudioManager;
22 import android.media.AudioManager.OnAudioFocusChangeListener;
33 private final AudioManager mAudio;
41 mAudio = (AudioManager) mService.getSystemService(Context.AUDIO_SERVICE); in AudioManagerFacade()
44 if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) { in AudioManagerFacade()
46 } else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) { in AudioManagerFacade()
66 AudioManager.STREAM_MUSIC, in audioRequestAudioFocus()
67 AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); in audioRequestAudioFocus()
68 if (status == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) { in audioRequestAudioFocus()
/external/oboe/apps/OboeTester/app/src/main/java/com/google/sample/oboe/manualtest/
DMainActivity.java27 import android.media.AudioManager;
85 AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate()
118 int state = intent.getIntExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, -1); in onCreate()
119 if (state == AudioManager.SCO_AUDIO_STATE_CONNECTING) { in onCreate()
121 } else if (state == AudioManager.SCO_AUDIO_STATE_CONNECTED) { in onCreate()
123 } else if (state == AudioManager.SCO_AUDIO_STATE_DISCONNECTED) { in onCreate()
138 new IntentFilter(AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED)); in registerScoStateReceiver()
199 AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in updateNativeAudioUI()
200 … String audioManagerSampleRate = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in updateNativeAudioUI()
201 …String audioManagerFramesPerBurst = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER… in updateNativeAudioUI()
[all …]
DTestAudioActivity.java22 import android.media.AudioManager;
331 AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in queryNativeAudioParameters()
332 audioManagerSampleRate = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in queryNativeAudioParameters()
333 …String audioManagerFramesPerBurstText = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES… in queryNativeAudioParameters()
433 AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in isScoDevice()
434 final AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL); in isScoDevice()
565 AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in startBluetoothSco()
570 AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in stopBluetoothSco()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/
DStreamVolumeManager.java22 import android.media.AudioManager;
45 private static final int VOLUME_FLAGS = AudioManager.FLAG_SHOW_UI;
50 private final AudioManager audioManager;
65 (AudioManager) applicationContext.getSystemService(Context.AUDIO_SERVICE)); in StreamVolumeManager()
133 audioManager.adjustStreamVolume(streamType, AudioManager.ADJUST_RAISE, VOLUME_FLAGS); in increaseVolume()
145 audioManager.adjustStreamVolume(streamType, AudioManager.ADJUST_LOWER, VOLUME_FLAGS); in decreaseVolume()
153 streamType, muted ? AudioManager.ADJUST_MUTE : AudioManager.ADJUST_UNMUTE, VOLUME_FLAGS); in setMuted()
179 private static int getVolumeFromManager(AudioManager audioManager, @C.StreamType int streamType) { in getVolumeFromManager()
184 AudioManager audioManager, @C.StreamType int streamType) { in getMutedFromManager()
DAudioFocusManager.java20 import android.media.AudioManager;
98 private final AudioManager audioManager;
119 (AudioManager) context.getApplicationContext().getSystemService(Context.AUDIO_SERVICE); in AudioFocusManager()
177 /* package */ AudioManager.OnAudioFocusChangeListener getFocusListener() { in getFocusListener()
191 if (requestResult == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) { in requestAudioFocus()
355 case AudioManager.AUDIOFOCUS_GAIN: in handlePlatformAudioFocusChange()
359 case AudioManager.AUDIOFOCUS_LOSS: in handlePlatformAudioFocusChange()
363 case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT: in handlePlatformAudioFocusChange()
364 case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK: in handlePlatformAudioFocusChange()
365 if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT || willPauseWhenDucked()) { in handlePlatformAudioFocusChange()
[all …]
/external/webrtc/examples/androidapp/src/org/appspot/apprtc/
DAppRTCAudioManager.java20 import android.media.AudioManager;
62 private AudioManager audioManager;
67 private int savedAudioMode = AudioManager.MODE_INVALID;
110 private AudioManager.OnAudioFocusChangeListener audioFocusChangeListener;
168 audioManager = ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE)); in AppRTCAudioManager()
217 audioFocusChangeListener = new AudioManager.OnAudioFocusChangeListener() { in start()
228 case AudioManager.AUDIOFOCUS_GAIN: in start()
231 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT: in start()
234 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE: in start()
237 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK: in start()
[all …]
/external/oboe/samples/LiveEffect/src/main/java/com/google/oboe/samples/liveEffect/
DLiveEffectEngine.java19 import android.media.AudioManager;
43AudioManager myAudioMgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in setDefaultStreamValues()
44 String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in setDefaultStreamValues()
46 … String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in setDefaultStreamValues()
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/
DC.java21 import android.media.AudioManager;
141 public static final int AUDIO_SESSION_ID_UNSET = AudioManager.AUDIO_SESSION_ID_GENERATE;
260 public static final int STREAM_TYPE_ALARM = AudioManager.STREAM_ALARM;
264 public static final int STREAM_TYPE_DTMF = AudioManager.STREAM_DTMF;
268 public static final int STREAM_TYPE_MUSIC = AudioManager.STREAM_MUSIC;
272 public static final int STREAM_TYPE_NOTIFICATION = AudioManager.STREAM_NOTIFICATION;
276 public static final int STREAM_TYPE_RING = AudioManager.STREAM_RING;
280 public static final int STREAM_TYPE_SYSTEM = AudioManager.STREAM_SYSTEM;
284 public static final int STREAM_TYPE_VOICE_CALL = AudioManager.STREAM_VOICE_CALL;
288 public static final int STREAM_TYPE_USE_DEFAULT = AudioManager.USE_DEFAULT_STREAM_TYPE;
[all …]
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DSettingsFacade.java24 import android.media.AudioManager;
55 private final AudioManager mAudio;
72 mAudio = (AudioManager) mService.getSystemService(Context.AUDIO_SERVICE); in SettingsFacade()
111 return mAudio.getRingerMode() == AudioManager.RINGER_MODE_SILENT; in checkRingerSilentMode()
121 mAudio.setRingerMode(enabled ? AudioManager.RINGER_MODE_SILENT in toggleRingerSilentMode()
122 : AudioManager.RINGER_MODE_NORMAL); in toggleRingerSilentMode()
128 if (AudioManager.isValidRingerMode(mode)) { in setRingerMode()
143 return mAudio.getStreamMaxVolume(AudioManager.STREAM_RING); in getMaxRingerVolume()
148 return mAudio.getStreamVolume(AudioManager.STREAM_RING); in getRingerVolume()
153 mAudio.setStreamVolume(AudioManager.STREAM_RING, volume, 0); in setRingerVolume()
[all …]
/external/oboe/samples/RhythmGame/src/main/java/com/google/oboe/samples/rhythmgame/
DMainActivity.java23 import android.media.AudioManager;
55AudioManager myAudioMgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in setDefaultStreamValues()
56 String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in setDefaultStreamValues()
58 … String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in setDefaultStreamValues()
/external/oboe/samples/hello-oboe/src/main/java/com/google/oboe/samples/hellooboe/
DPlaybackEngine.java19 import android.media.AudioManager;
42AudioManager myAudioMgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in setDefaultStreamValues()
43 String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in setDefaultStreamValues()
45 … String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in setDefaultStreamValues()
/external/oboe/samples/MegaDrone/src/main/java/com/google/oboe/samples/megadrone/
DMainActivity.java22 import android.media.AudioManager;
95AudioManager myAudioMgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in setDefaultStreamValues()
96 String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE); in setDefaultStreamValues()
98 … String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in setDefaultStreamValues()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/audio/
DAudioCapabilities.java23 import android.media.AudioManager;
61 /* receiver= */ null, new IntentFilter(AudioManager.ACTION_HDMI_AUDIO_PLUG)); in getCapabilities()
71 if (intent == null || intent.getIntExtra(AudioManager.EXTRA_AUDIO_PLUG_STATE, 0) == 0) { in getCapabilities()
75 intent.getIntArrayExtra(AudioManager.EXTRA_ENCODINGS), in getCapabilities()
77 AudioManager.EXTRA_MAX_CHANNEL_COUNT, /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT)); in getCapabilities()
/external/drrickorang/LoopbackApp/app/src/main/java/org/drrickorang/loopback/
DSoundLevelCalibration.java20 import android.media.AudioManager;
35 private AudioManager mAudioManager;
66 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in SoundLevelCalibration()
71 final int maxLevel = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in calibrate()
130 mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, level, 0); in setVolume()
/external/oboe/samples/audio-device/src/main/java/com/google/oboe/samples/audio_device/
DAudioDeviceListEntry.java20 import android.media.AudioManager;
84 if (directionType == AudioManager.GET_DEVICES_ALL || in createListFrom()
85 (directionType == AudioManager.GET_DEVICES_OUTPUTS && info.isSink()) || in createListFrom()
86 (directionType == AudioManager.GET_DEVICES_INPUTS && info.isSource())) { in createListFrom()
/external/oboe/apps/OboeTester/app/src/main/java/com/google/sample/audio_device/
DAudioDeviceListEntry.java20 import android.media.AudioManager;
84 if (directionType == AudioManager.GET_DEVICES_ALL || in createListFrom()
85 (directionType == AudioManager.GET_DEVICES_OUTPUTS && info.isSink()) || in createListFrom()
86 (directionType == AudioManager.GET_DEVICES_INPUTS && info.isSource())) { in createListFrom()

1234