summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-03-06 11:28:04 -0800
committerGlenn Kasten <gkasten@google.com>2012-03-07 11:04:55 -0800
commit08d2c041940f80161a306304e18aa4a736cccf4a (patch)
treebea9d1165676a9b5fa873b8f358155449720acbc /services/audioflinger/AudioFlinger.h
parent9778bd1f33a28f3f403a93ba195121c3d03fb266 (diff)
downloadframeworks_base-08d2c041940f80161a306304e18aa4a736cccf4a.zip
frameworks_base-08d2c041940f80161a306304e18aa4a736cccf4a.tar.gz
frameworks_base-08d2c041940f80161a306304e18aa4a736cccf4a.tar.bz2
Isolate references to outputTracks/mOutputTracks
Move all references to DuplicatingThread::outputTracks and DuplicatingThread::mOutputTracks from the common threadLoop() into virtual methods. This allows them to be moved from PlaybackThread to DuplicatingThread, and to be marked private. Also use vector assignment to copy mOutputTracks to outputTracks. Change-Id: Ieb1cf1ad36b8a65143e61e6c92a65fb43427e5e2
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 8ca4f89..518a99c 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -920,6 +920,10 @@ public:
// Code snippets that are temporarily lifted up out of threadLoop() until the merge
void checkSilentMode_l();
+ // Non-trivial for DUPLICATING only
+ virtual void saveOutputTracks() { }
+ virtual void clearOutputTracks() { }
+
private:
friend class AudioFlinger;
@@ -972,9 +976,7 @@ public:
// activeTrack was local to the while !exitingPending loop
sp<Track> activeTrack;
// DUPLICATING only
- SortedVector < sp<OutputTrack> > outputTracks;
uint32_t writeFrames;
- SortedVector < sp<OutputTrack> > mOutputTracks;
};
class MixerThread : public PlaybackThread {
@@ -1070,9 +1072,13 @@ private:
// called from threadLoop, addOutputTrack, removeOutputTrack
virtual void updateWaitTime_l();
+ virtual void saveOutputTracks();
+ virtual void clearOutputTracks();
private:
uint32_t mWaitTimeMs;
+ SortedVector < sp<OutputTrack> > outputTracks;
+ SortedVector < sp<OutputTrack> > mOutputTracks;
};
PlaybackThread *checkPlaybackThread_l(audio_io_handle_t output) const;