Used native deinterleaved and float point format for the input streams.
commitebae1d3f36f0139ed578e36e21e8ac372e9424f6
authorxians <xians@chromium.org>
Fri, 29 Aug 2014 15:17:28 +0000 (29 08:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 29 Aug 2014 15:18:32 +0000 (29 15:18 +0000)
tree51d4c00bcc376e4974a242e904562ad5f3ba2f42
parent22aa58e63b325a6fbdea7f59ce9b0b6e63ac96cc
Used native deinterleaved and float point format for the input streams.

If we call GetProperty of kAudioUnitProperty_StreamFormat before setting the format, the device will report kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved as the native format of the device, which is the same as the output.

This patch changes the format to use kAudioFormatFlagsNativeFloatPacked | kLinearPCMFormatFlagIsNonInterleaved to open the device, so that we will avoid format flipping back and forth. Hope this optimization will help increase the stability of the input audio on Mac.

TBR=DaleCurtis@chromium.org

BUG=404884
TEST=media_unittests && https://webrtc.googlecode.com/svn-history/r5497/trunk/samples/js/demos/html/pc1.html, https://www.google.com/intl/en/chrome/demos/speech.html

Review URL: https://codereview.chromium.org/510073002

Cr-Commit-Position: refs/heads/master@{#292636}
media/audio/mac/audio_low_latency_input_mac.cc
media/audio/mac/audio_low_latency_input_mac.h
media/base/audio_block_fifo.cc
media/base/audio_block_fifo.h
media/base/audio_block_fifo_unittest.cc