From 4d23ca370dd0ce584f49a80ef9dfcdbb75ba2c8e Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Tue, 13 May 2014 10:39:51 -0700 Subject: Use sp<> instead of raw pointer for FastMixer This avoids worry about the thread lifetime during tear-down. Bug: 15858655 Change-Id: I896d24317bd6f53a574645cdf4cd514eaa205dd5 --- services/audioflinger/Threads.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/audioflinger/Threads.h') diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 07887fb..93d2635 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -852,7 +852,7 @@ protected: AudioMixer* mAudioMixer; // normal mixer private: // one-time initialization, no locks required - FastMixer* mFastMixer; // non-NULL if there is also a fast mixer + sp mFastMixer; // non-0 if there is also a fast mixer sp mAudioWatchdog; // non-0 if there is an audio watchdog thread // contents are not guaranteed to be consistent, no locks required @@ -868,7 +868,7 @@ private: int32_t mFastMixerFutex; // for cold idle public: - virtual bool hasFastMixer() const { return mFastMixer != NULL; } + virtual bool hasFastMixer() const { return mFastMixer != 0; } virtual FastTrackUnderruns getFastTrackUnderruns(size_t fastIndex) const { ALOG_ASSERT(fastIndex < FastMixerState::kMaxFastTracks); return mFastMixerDumpState.mTracks[fastIndex].mUnderruns; -- cgit v1.1