diff options
author | Glenn Kasten <gkasten@google.com> | 2012-03-12 16:29:55 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-03-13 11:09:47 -0700 |
commit | e53b9ead781c36e96d6b6f012ddffc93a3d80f0d (patch) | |
tree | 4bcde0bc9a797851ec1bee4f630c8c4f0735f623 /media/libmedia/AudioRecord.cpp | |
parent | b87396f9ebabbb7b47683bceca96cbe635a1ca00 (diff) | |
download | frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.zip frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.tar.gz frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.tar.bz2 |
Whitespace and indentation
Fix indentation to be multiple of 4.
Make it easier to search:
sp< not sp < to
"switch (...)" instead of "switch(...)" (also "if" and "while")
Remove redundant blank line at start or EOF.
Remove whitespace at end of line.
Remove extra blank lines where they don't add value.
Use git diff -b or -w to verify.
Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
Diffstat (limited to 'media/libmedia/AudioRecord.cpp')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index 22c3a18..05ade75 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -293,13 +293,13 @@ status_t AudioRecord::start() return WOULD_BLOCK; } } - } + } AutoMutex lock(mLock); // acquire a strong reference on the IAudioRecord and IMemory so that they cannot be destroyed // while we are accessing the cblk - sp <IAudioRecord> audioRecord = mAudioRecord; - sp <IMemory> iMem = mCblkMemory; + sp<IAudioRecord> audioRecord = mAudioRecord; + sp<IMemory> iMem = mCblkMemory; audio_track_cblk_t* cblk = mCblk; if (mActive == 0) { mActive = 1; @@ -638,8 +638,8 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize) mLock.lock(); // acquire a strong reference on the IAudioRecord and IMemory so that they cannot be destroyed // while we are accessing the cblk - sp <IAudioRecord> audioRecord = mAudioRecord; - sp <IMemory> iMem = mCblkMemory; + sp<IAudioRecord> audioRecord = mAudioRecord; + sp<IMemory> iMem = mCblkMemory; mLock.unlock(); do { @@ -684,8 +684,8 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread) mLock.lock(); // acquire a strong reference on the IAudioRecord and IMemory so that they cannot be destroyed // while we are accessing the cblk - sp <IAudioRecord> audioRecord = mAudioRecord; - sp <IMemory> iMem = mCblkMemory; + sp<IAudioRecord> audioRecord = mAudioRecord; + sp<IMemory> iMem = mCblkMemory; audio_track_cblk_t* cblk = mCblk; mLock.unlock(); @@ -806,7 +806,7 @@ status_t AudioRecord::restoreRecord_l(audio_track_cblk_t*& cblk) } } ALOGV("restoreRecord_l() status %d mActive %d cblk %p, old cblk %p flags %08x old flags %08x", - result, mActive, mCblk, cblk, mCblk->flags, cblk->flags); + result, mActive, mCblk, cblk, mCblk->flags, cblk->flags); if (result == NO_ERROR) { // from now on we switch to the newly created cblk @@ -843,4 +843,3 @@ status_t AudioRecord::ClientRecordThread::readyToRun() // ------------------------------------------------------------------------- }; // namespace android - |