From c671139ef22875c34368dd72bbdffe76640239bf Mon Sep 17 00:00:00 2001 From: phoglund Date: Thu, 8 Oct 2015 06:33:49 -0700 Subject: [PATCH] Removing M API call for now to green up downstream. BUG=None Review URL: https://codereview.webrtc.org/1392903005 Cr-Commit-Position: refs/heads/master@{#10219} --- .../src/org/webrtc/voiceengine/WebRtcAudioRecord.java | 11 +++++++---- .../src/org/webrtc/voiceengine/WebRtcAudioUtils.java | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java index 84e3fb8ed7..ff77635843 100644 --- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java +++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java @@ -214,15 +214,18 @@ class WebRtcAudioRecord { if (effects != null) { effects.enable(audioRecord.getAudioSessionId()); } - if (WebRtcAudioUtils.runningOnMOrHigher()) { + // TODO(phoglund): put back audioRecord.getBufferSizeInFrames when + // all known downstream users supports M. + // if (WebRtcAudioUtils.runningOnMOrHigher()) { // Returns the frame count of the native AudioRecord buffer. This is // greater than or equal to the bufferSizeInBytes converted to frame // units. The native frame count may be enlarged to accommodate the // requirements of the source on creation or if the AudioRecord is // subsequently rerouted. - Logging.d(TAG, "bufferSizeInFrames: " - + audioRecord.getBufferSizeInFrames()); - } + + // Logging.d(TAG, "bufferSizeInFrames: " + // + audioRecord.getBufferSizeInFrames()); + //} return framesPerBuffer; } diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java index f869e8036e..9a13bf2f9e 100644 --- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java +++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java @@ -147,10 +147,11 @@ public final class WebRtcAudioUtils { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; } - public static boolean runningOnMOrHigher() { + // TODO(phoglund): enable when all downstream users use M. + // public static boolean runningOnMOrHigher() { // API Level 23. - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; - } + // return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; + //} // Helper method for building a string of thread information. public static String getThreadInfo() {