diff options
author | Glenn Kasten <gkasten@google.com> | 2012-11-13 12:25:44 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-11-13 12:25:44 -0800 |
commit | 2d81f665461409f0c5d0be674a35a0aea63a4fc8 (patch) | |
tree | 9a3a7d006bfdba1e83b4d98ef408dd8dcb4e4501 | |
parent | b36a7a68af073b1e7fd5cad6aa2c52223fd30efd (diff) | |
parent | 9f2016d9adfb4f88fa0bbfcfa5954f79160db595 (diff) | |
download | frameworks_av-2d81f665461409f0c5d0be674a35a0aea63a4fc8.zip frameworks_av-2d81f665461409f0c5d0be674a35a0aea63a4fc8.tar.gz frameworks_av-2d81f665461409f0c5d0be674a35a0aea63a4fc8.tar.bz2 |
Merge "Rename TrackBase::mFrameCount to mStepCount"
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 14 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 5 |
2 files changed, 10 insertions, 9 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index eb20019..9353e70 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -4186,7 +4186,7 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( mCblk(NULL), // mBuffer // mBufferEnd - mFrameCount(0), + mStepCount(0), mState(IDLE), mSampleRate(sampleRate), mFormat(format), @@ -4277,7 +4277,7 @@ AudioFlinger::ThreadBase::TrackBase::~TrackBase() void AudioFlinger::ThreadBase::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer) { buffer->raw = NULL; - mFrameCount = buffer->frameCount; + mStepCount = buffer->frameCount; // FIXME See note at getNextBuffer() (void) step(); // ignore return value of step() buffer->frameCount = 0; @@ -4287,7 +4287,7 @@ bool AudioFlinger::ThreadBase::TrackBase::step() { bool result; audio_track_cblk_t* cblk = this->cblk(); - result = cblk->stepServer(mFrameCount, isOut()); + result = cblk->stepServer(mStepCount, isOut()); if (!result) { ALOGV("stepServer failed acquiring cblk mutex"); mStepServerFailed = true; @@ -4435,7 +4435,7 @@ void AudioFlinger::PlaybackThread::Track::destroy() /*static*/ void AudioFlinger::PlaybackThread::Track::appendDumpHeader(String8& result) { - result.append(" Name Client Type Fmt Chn mask Session mFrCnt fCount S M F SRate " + result.append(" Name Client Type Fmt Chn mask Session StpCnt fCount S M F SRate " "L dB R dB Server User Main buf Aux Buf Flags Underruns\n"); } @@ -4506,7 +4506,7 @@ void AudioFlinger::PlaybackThread::Track::dump(char* buffer, size_t size) mFormat, mChannelMask, mSessionId, - mFrameCount, + mStepCount, mCblk->frameCount, stateChar, mMute, @@ -5499,7 +5499,7 @@ void AudioFlinger::RecordThread::RecordTrack::stop() /*static*/ void AudioFlinger::RecordThread::RecordTrack::appendDumpHeader(String8& result) { - result.append(" Clien Fmt Chn mask Session Buf S SRate Serv User FrameCount\n"); + result.append(" Clien Fmt Chn mask Session Step S SRate Serv User FrameCount\n"); } void AudioFlinger::RecordThread::RecordTrack::dump(char* buffer, size_t size) @@ -5509,7 +5509,7 @@ void AudioFlinger::RecordThread::RecordTrack::dump(char* buffer, size_t size) mFormat, mChannelMask, mSessionId, - mFrameCount, + mStepCount, mState, mCblk->sampleRate, mCblk->server, diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 38744d0..8cf58b1 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -453,7 +453,7 @@ private: return mState == TERMINATED; } - bool step(); + bool step(); // mStepCount is an implicit input void reset(); virtual bool isOut() const = 0; // true for Track and TimedTrack, false for RecordTrack, @@ -466,7 +466,8 @@ private: void* mBuffer; // start of track buffer, typically in shared memory void* mBufferEnd; // &mBuffer[mFrameCount * frameSize], where frameSize // is based on mChannelCount and 16-bit samples - uint32_t mFrameCount; + uint32_t mStepCount; // saves AudioBufferProvider::Buffer::frameCount as of + // time of releaseBuffer() for later use by step() // we don't really need a lock for these track_state mState; const uint32_t mSampleRate; // initial sample rate only; for tracks which |