AudioFlinger: Add more Thread interfaces
Add interfaces
IAfDirectOutputThread
IAfDuplicatingThread
IAfRecordThread
Test: atest audiorecord_tests audiotrack_tests audiorouting_tests trackplayerbase_tests audiosystem_tests
Test: atest AudioTrackTest AudioRecordTest
Test: YouTube Camera
Bug: 288339104
Bug: 289233517
Change-Id: Ibd46b7de4c4264294b645d0df2a69825513a1426
diff --git a/services/audioflinger/IAfEffect.h b/services/audioflinger/IAfEffect.h
index 29f1862..c6cb3c9 100644
--- a/services/audioflinger/IAfEffect.h
+++ b/services/audioflinger/IAfEffect.h
@@ -23,6 +23,7 @@
class IAfEffectChain;
class IAfEffectHandle;
class IAfEffectModule;
+class IAfThreadBase;
// Interface implemented by the EffectModule parent or owner (e.g an EffectChain) to abstract
// interactions between the EffectModule and the reset of the audio framework.
@@ -190,7 +191,7 @@
// Most of these methods are accessed from AudioFlinger::Thread
public:
static sp<IAfEffectChain> create(
- const wp<Thread /*ThreadBase*/>& wThread, // TODO(b/288339104) type
+ const wp<IAfThreadBase>& wThread,
audio_session_t sessionId);
// special key used for an entry in mSuspendedEffects keyed vector
@@ -279,8 +280,7 @@
virtual bool isBitPerfectCompatible() const = 0;
// isCompatibleWithThread_l() must be called with thread->mLock held
- // TODO(b/288339104) type
- virtual bool isCompatibleWithThread_l(const sp<Thread>& thread) const = 0;
+ virtual bool isCompatibleWithThread_l(const sp<IAfThreadBase>& thread) const = 0;
virtual bool containsHapticGeneratingEffect_l() = 0;
@@ -288,8 +288,8 @@
virtual sp<EffectCallbackInterface> effectCallback() const = 0;
- virtual wp<Thread> thread() const = 0; // TODO(b/288339104) type
- virtual void setThread(const sp<Thread>& thread) = 0; // TODO(b/288339104) type
+ virtual wp<IAfThreadBase> thread() const = 0;
+ virtual void setThread(const sp<IAfThreadBase>& thread) = 0;
virtual bool isFirstEffect(int id) const = 0;