Loading services/audioflinger/AudioFlinger.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -1163,6 +1163,8 @@ AudioFlinger::ThreadBase::~ThreadBase() void AudioFlinger::ThreadBase::exit() { ALOGV("ThreadBase::exit"); // do any cleanup required for exit to succeed preExit(); { // This lock prevents the following race in thread (uniprocessor for illustration): // if (!exitPending()) { Loading Loading @@ -1694,6 +1696,15 @@ void AudioFlinger::PlaybackThread::onFirstRef() run(mName, ANDROID_PRIORITY_URGENT_AUDIO); } // ThreadBase virtuals void AudioFlinger::PlaybackThread::preExit() { ALOGV(" preExit()"); // FIXME this is using hard-coded strings but in the future, this functionality will be // converted to use audio HAL extensions required to support tunneling mOutput->stream->common.set_parameters(&mOutput->stream->common, "exiting=1"); } // PlaybackThread::createTrack_l() must be called with AudioFlinger::mLock held sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrack_l( const sp<AudioFlinger::Client>& client, Loading services/audioflinger/AudioFlinger.h +5 −0 Original line number Diff line number Diff line Loading @@ -682,6 +682,8 @@ private: // check if some effects must be suspended when an effect chain is added void checkSuspendOnAddEffectChain_l(const sp<EffectChain>& chain); virtual void preExit() { } friend class AudioFlinger; // for mEffectChains const type_t mType; Loading Loading @@ -1050,6 +1052,9 @@ protected: // is safe to do so. That will drop the final ref count and destroy the tracks. virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove) = 0; // ThreadBase virtuals virtual void preExit(); public: virtual status_t initCheck() const { return (mOutput == NULL) ? NO_INIT : NO_ERROR; } Loading Loading
services/audioflinger/AudioFlinger.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -1163,6 +1163,8 @@ AudioFlinger::ThreadBase::~ThreadBase() void AudioFlinger::ThreadBase::exit() { ALOGV("ThreadBase::exit"); // do any cleanup required for exit to succeed preExit(); { // This lock prevents the following race in thread (uniprocessor for illustration): // if (!exitPending()) { Loading Loading @@ -1694,6 +1696,15 @@ void AudioFlinger::PlaybackThread::onFirstRef() run(mName, ANDROID_PRIORITY_URGENT_AUDIO); } // ThreadBase virtuals void AudioFlinger::PlaybackThread::preExit() { ALOGV(" preExit()"); // FIXME this is using hard-coded strings but in the future, this functionality will be // converted to use audio HAL extensions required to support tunneling mOutput->stream->common.set_parameters(&mOutput->stream->common, "exiting=1"); } // PlaybackThread::createTrack_l() must be called with AudioFlinger::mLock held sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrack_l( const sp<AudioFlinger::Client>& client, Loading
services/audioflinger/AudioFlinger.h +5 −0 Original line number Diff line number Diff line Loading @@ -682,6 +682,8 @@ private: // check if some effects must be suspended when an effect chain is added void checkSuspendOnAddEffectChain_l(const sp<EffectChain>& chain); virtual void preExit() { } friend class AudioFlinger; // for mEffectChains const type_t mType; Loading Loading @@ -1050,6 +1052,9 @@ protected: // is safe to do so. That will drop the final ref count and destroy the tracks. virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove) = 0; // ThreadBase virtuals virtual void preExit(); public: virtual status_t initCheck() const { return (mOutput == NULL) ? NO_INIT : NO_ERROR; } Loading