summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-07-16 14:24:34 -0700
committerGlenn Kasten <gkasten@google.com>2012-08-01 09:11:11 -0700
commit510a3d6b8018a77683dac466127ffd0af34bef6e (patch)
tree1f3410b20a4dcbe77dd9b40800bdd569ceaff384 /services/audioflinger/AudioFlinger.h
parent25f0d7ba1987de61c75f8c68b19de48e0ad9736c (diff)
downloadframeworks_av-510a3d6b8018a77683dac466127ffd0af34bef6e.zip
frameworks_av-510a3d6b8018a77683dac466127ffd0af34bef6e.tar.gz
frameworks_av-510a3d6b8018a77683dac466127ffd0af34bef6e.tar.bz2
Start adding support for multiple record tracks
Replace single mTrack by vector mTracks. Destroy record tracks similarly to playback tracks. Dump all record tracks, in addition to the active record track. Change-Id: I503f10b51928b6b92698fe1c51a9ddd3215df1f4
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index e629533..2b6d00f 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -1381,11 +1381,14 @@ private:
virtual status_t start(AudioSystem::sync_event_t event, int triggerSession);
virtual void stop();
+ void destroy();
+
// clear the buffer overflow flag
void clearOverflow() { mOverflow = false; }
// set the buffer overflow flag and return previous value
bool setOverflow() { bool tmp = mOverflow; mOverflow = true; return tmp; }
+ static void appendDumpHeader(String8& result);
void dump(char* buffer, size_t size);
private:
@@ -1409,6 +1412,13 @@ private:
audio_devices_t device);
virtual ~RecordThread();
+ // no addTrack_l ?
+ void destroyTrack_l(const sp<RecordTrack>& track);
+ void removeTrack_l(const sp<RecordTrack>& track);
+
+ void dumpInternals(int fd, const Vector<String16>& args);
+ void dumpTracks(int fd, const Vector<String16>& args);
+
// Thread
virtual bool threadLoop();
virtual status_t readyToRun();
@@ -1453,7 +1463,11 @@ private:
virtual status_t addEffectChain_l(const sp<EffectChain>& chain);
virtual size_t removeEffectChain_l(const sp<EffectChain>& chain);
virtual uint32_t hasAudioSession(int sessionId);
- RecordTrack* track();
+
+ // Return the set of unique session IDs across all tracks.
+ // The keys are the session IDs, and the associated values are meaningless.
+ // FIXME replace by Set [and implement Bag/Multiset for other uses].
+ KeyedVector<int, bool> sessionIds();
virtual status_t setSyncEvent(const sp<SyncEvent>& event);
virtual bool isValidSyncEvent(const sp<SyncEvent>& event);
@@ -1471,7 +1485,9 @@ private:
void inputStandBy();
AudioStreamIn *mInput;
- RecordTrack* mTrack;
+ SortedVector < sp<RecordTrack> > mTracks;
+ // mActiveTrack has dual roles: it indicates the current active track, and
+ // is used together with mStartStopCond to indicate start()/stop() progress
sp<RecordTrack> mActiveTrack;
Condition mStartStopCond;
AudioResampler *mResampler;