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}
This commit is contained in:
phoglund 2015-10-08 06:33:49 -07:00 committed by Commit bot
parent ac30642461
commit c671139ef2
2 changed files with 11 additions and 7 deletions

View File

@ -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;
}

View File

@ -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() {