summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-05-13 10:39:51 -0700
committerGlenn Kasten <gkasten@google.com>2014-06-24 14:23:51 -0700
commit4d23ca370dd0ce584f49a80ef9dfcdbb75ba2c8e (patch)
tree8bde5cebd55bd04d58c4200f6879984e863d2b77 /services/audioflinger/Threads.h
parentc27f5259cf2c45ea6f0a021fc17578f32f6c2f7d (diff)
downloadframeworks_av-4d23ca370dd0ce584f49a80ef9dfcdbb75ba2c8e.zip
frameworks_av-4d23ca370dd0ce584f49a80ef9dfcdbb75ba2c8e.tar.gz
frameworks_av-4d23ca370dd0ce584f49a80ef9dfcdbb75ba2c8e.tar.bz2
Use sp<> instead of raw pointer for FastMixer
This avoids worry about the thread lifetime during tear-down. Bug: 15858655 Change-Id: I896d24317bd6f53a574645cdf4cd514eaa205dd5
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r--services/audioflinger/Threads.h4
1 files changed, 2 insertions, 2 deletions
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<FastMixer> mFastMixer; // non-0 if there is also a fast mixer
sp<AudioWatchdog> 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;