Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java

Issue 1419693004: Fix for "Android audio playout doesn't support non-call media stream" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback from magjed@ Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
index 10fe8ca33fcc06f5d57315bae6ea681337b38283..cf2f03a2f18ac86e21dfc2bbb145dfafa22f62d4 100644
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java
@@ -71,6 +71,7 @@ class WebRtcAudioManager {
private int channels;
private int outputBufferSize;
private int inputBufferSize;
+ private int outputStreamType;
WebRtcAudioManager(Context context, long nativeAudioManager) {
Logging.d(TAG, "ctor" + WebRtcAudioUtils.getThreadInfo());
@@ -84,7 +85,7 @@ class WebRtcAudioManager {
storeAudioParameters();
nativeCacheAudioParameters(
sampleRate, channels, hardwareAEC, hardwareAGC, hardwareNS,
- lowLatencyOutput, outputBufferSize, inputBufferSize,
+ lowLatencyOutput, outputBufferSize, inputBufferSize, outputStreamType,
nativeAudioManager);
}
@@ -132,6 +133,8 @@ class WebRtcAudioManager {
getMinOutputFrameSize(sampleRate, channels);
// TODO(henrika): add support for low-latency input.
inputBufferSize = getMinInputFrameSize(sampleRate, channels);
+ outputStreamType = WebRtcAudioUtils.getOutputStreamTypeFromAudioMode(
+ audioManager.getMode());
}
// Gets the current earpiece state.
@@ -267,5 +270,5 @@ class WebRtcAudioManager {
private native void nativeCacheAudioParameters(
int sampleRate, int channels, boolean hardwareAEC, boolean hardwareAGC,
boolean hardwareNS, boolean lowLatencyOutput, int outputBufferSize,
- int inputBufferSize, long nativeAudioManager);
+ int inputBufferSize, int outputStreamType, long nativeAudioManager);
}

Powered by Google App Engine
This is Rietveld 408576698