diff options
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r-- | services/audioflinger/Threads.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index ecb8e4e..56a42a8 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -712,6 +712,9 @@ protected: audio_patch_handle_t *handle); virtual status_t releaseAudioPatch_l(const audio_patch_handle_t handle); + bool usesHwAvSync() const { return (mType == DIRECT) && (mOutput != NULL) && + (mOutput->flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC); } + private: friend class AudioFlinger; // for numerous @@ -729,9 +732,7 @@ private: void dumpTracks(int fd, const Vector<String16>& args); SortedVector< sp<Track> > mTracks; - // mStreamTypes[] uses 1 additional stream type internally for the OutputTrack used by - // DuplicatingThread - stream_type_t mStreamTypes[AUDIO_STREAM_CNT + 1]; + stream_type_t mStreamTypes[AUDIO_STREAM_CNT]; AudioStreamOut *mOutput; float mMasterVolume; @@ -813,7 +814,9 @@ public: protected: // accessed by both binder threads and within threadLoop(), lock on mutex needed unsigned mFastTrackAvailMask; // bit i set if fast track [i] is available - + bool mHwSupportsPause; + bool mHwPaused; + bool mFlushPending; private: // timestamp latch: // D input is written by threadLoop_write while mutex is unlocked, and read while locked @@ -914,6 +917,8 @@ protected: virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove); virtual void threadLoop_mix(); virtual void threadLoop_sleepTime(); + virtual void threadLoop_exit(); + virtual bool shouldStandby_l(); // volumes last sent to audio HAL with stream->set_volume() float mLeftVolFloat; @@ -944,12 +949,9 @@ protected: virtual bool waitingAsyncCallback(); virtual bool waitingAsyncCallback_l(); - virtual bool shouldStandby_l(); virtual void onAddNewTrack_l(); private: - bool mHwPaused; - bool mFlushPending; size_t mPausedWriteLength; // length in bytes of write interrupted by pause size_t mPausedBytesRemaining; // bytes still waiting in mixbuffer after resume wp<Track> mPreviousTrack; // used to detect track switch |