diff options
author | Glenn Kasten <gkasten@google.com> | 2013-01-10 14:26:24 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-01-10 14:52:24 -0800 |
commit | 45490af027a15af9fe0fdfca21f423c74cd8e4e9 (patch) | |
tree | aef82885d2e5fbdaeea8ed57e5a83afb93d2db8c /media/libmedia | |
parent | 95819503abcfafdb37fbba1401b6cd9dd91ff2f1 (diff) | |
download | frameworks_av-45490af027a15af9fe0fdfca21f423c74cd8e4e9.zip frameworks_av-45490af027a15af9fe0fdfca21f423c74cd8e4e9.tar.gz frameworks_av-45490af027a15af9fe0fdfca21f423c74cd8e4e9.tar.bz2 |
Fix AudioRecord
Bug: 7965744
Change-Id: Ic024e7fb32f7459b8093c2cf6cd5752aade21ddb
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 4f555c1..0a2b0b0 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -164,6 +164,7 @@ status_t AudioRecord::set( ALOGE("Invalid format"); return BAD_VALUE; } + mFormat = format; if (!audio_is_input_channel(channelMask)) { return BAD_VALUE; @@ -172,7 +173,7 @@ status_t AudioRecord::set( uint32_t channelCount = popcount(channelMask); mChannelCount = channelCount; - if (audio_is_linear_pcm(mFormat)) { + if (audio_is_linear_pcm(format)) { mFrameSize = channelCount * audio_bytes_per_sample(format); } else { mFrameSize = sizeof(uint8_t); @@ -226,7 +227,6 @@ status_t AudioRecord::set( mStatus = NO_ERROR; - mFormat = format; // Update buffer size in case it has been limited by AudioFlinger during track creation mFrameCount = mCblk->frameCount_; |