summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioRecord.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2015-03-20 09:04:21 -0700
committerGlenn Kasten <gkasten@google.com>2015-03-23 08:02:54 -0700
commitae4b879d04c4b07c62241a8f507c8dce11e628e4 (patch)
treedc9dbff427144ad7d6b18f7ba65eb5720a8dadc7 /media/libmedia/AudioRecord.cpp
parenta9757af8a140a1d5ae261c22f9d7eebef99cbe96 (diff)
downloadframeworks_av-ae4b879d04c4b07c62241a8f507c8dce11e628e4.zip
frameworks_av-ae4b879d04c4b07c62241a8f507c8dce11e628e4.tar.gz
frameworks_av-ae4b879d04c4b07c62241a8f507c8dce11e628e4.tar.bz2
Declare and initialize in one statement
Change-Id: Ie8593692907e67558f9d7654c9a4bf8cbce99bd8
Diffstat (limited to 'media/libmedia/AudioRecord.cpp')
-rw-r--r--media/libmedia/AudioRecord.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index c837f86..a2b4241 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -424,7 +424,6 @@ uint32_t AudioRecord::getInputFramesLost() const
// must be called with mLock held
status_t AudioRecord::openRecord_l(size_t epoch)
{
- status_t status;
const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
if (audioFlinger == 0) {
ALOGE("Could not get audioflinger");
@@ -460,7 +459,8 @@ status_t AudioRecord::openRecord_l(size_t epoch)
}
audio_io_handle_t input;
- status = AudioSystem::getInputForAttr(&mAttributes, &input, (audio_session_t)mSessionId,
+ status_t status = AudioSystem::getInputForAttr(&mAttributes, &input,
+ (audio_session_t)mSessionId,
mSampleRate, mFormat, mChannelMask, mFlags);
if (status != NO_ERROR) {
@@ -1001,14 +1001,13 @@ status_t AudioRecord::restoreRecord_l(const char *from)
{
ALOGW("dead IAudioRecord, creating a new one from %s()", from);
++mSequence;
- status_t result;
// if the new IAudioRecord is created, openRecord_l() will modify the
// following member variables: mAudioRecord, mCblkMemory, mCblk, mBufferMemory.
// It will also delete the strong references on previous IAudioRecord and IMemory
size_t position = mProxy->getPosition();
mNewPosition = position + mUpdatePeriod;
- result = openRecord_l(position);
+ status_t result = openRecord_l(position);
if (result == NO_ERROR) {
if (mActive) {
// callback thread or sync event hasn't changed