diff options
author | Eric Laurent <elaurent@google.com> | 2011-07-25 12:20:23 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-25 12:20:23 -0700 |
commit | 2df1f092bc046025b5d404ea7a74bfcd42b49ff6 (patch) | |
tree | 403e6cf6fb672c28785a622724d5c11f788fb8e4 | |
parent | 940dabfc669ef5973c54dcc62e38b4a095d1ff9f (diff) | |
parent | 1345d3307692b195be7a5a407e8fc61c4753c1d7 (diff) | |
download | frameworks_base-2df1f092bc046025b5d404ea7a74bfcd42b49ff6.zip frameworks_base-2df1f092bc046025b5d404ea7a74bfcd42b49ff6.tar.gz frameworks_base-2df1f092bc046025b5d404ea7a74bfcd42b49ff6.tar.bz2 |
Merge "AudioFlinger: add dump of audio pre processing."
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 38 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 2 |
2 files changed, 21 insertions, 19 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 0323fe0..cb1f921 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1043,6 +1043,25 @@ status_t AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args return NO_ERROR; } +status_t AudioFlinger::ThreadBase::dumpEffectChains(int fd, const Vector<String16>& args) +{ + const size_t SIZE = 256; + char buffer[SIZE]; + String8 result; + + snprintf(buffer, SIZE, "\n- %d Effect Chains:\n", mEffectChains.size()); + write(fd, buffer, strlen(buffer)); + + for (size_t i = 0; i < mEffectChains.size(); ++i) { + sp<EffectChain> chain = mEffectChains[i]; + if (chain != 0) { + chain->dump(fd, args); + } + } + return NO_ERROR; +} + + // ---------------------------------------------------------------------------- AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinger, @@ -1111,24 +1130,6 @@ status_t AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16> return NO_ERROR; } -status_t AudioFlinger::PlaybackThread::dumpEffectChains(int fd, const Vector<String16>& args) -{ - const size_t SIZE = 256; - char buffer[SIZE]; - String8 result; - - snprintf(buffer, SIZE, "\n- %d Effect Chains:\n", mEffectChains.size()); - write(fd, buffer, strlen(buffer)); - - for (size_t i = 0; i < mEffectChains.size(); ++i) { - sp<EffectChain> chain = mEffectChains[i]; - if (chain != 0) { - chain->dump(fd, args); - } - } - return NO_ERROR; -} - status_t AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& args) { const size_t SIZE = 256; @@ -4178,6 +4179,7 @@ status_t AudioFlinger::RecordThread::dump(int fd, const Vector<String16>& args) write(fd, result.string(), result.size()); dumpBase(fd, args); + dumpEffectChains(fd, args); return NO_ERROR; } diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index fff4f06..e2cf946 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -285,6 +285,7 @@ private: }; status_t dumpBase(int fd, const Vector<String16>& args); + status_t dumpEffectChains(int fd, const Vector<String16>& args); // base for record and playback class TrackBase : public AudioBufferProvider, public RefBase { @@ -724,7 +725,6 @@ private: virtual status_t dumpInternals(int fd, const Vector<String16>& args); status_t dumpTracks(int fd, const Vector<String16>& args); - status_t dumpEffectChains(int fd, const Vector<String16>& args); SortedVector< sp<Track> > mTracks; // mStreamTypes[] uses 1 additionnal stream type internally for the OutputTrack used by DuplicatingThread |