Loading include/private/media/AudioTrackShared.h +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ namespace android { #define CBLK_RESTORED_ON 0x0040 // track has been restored after invalidation #define CBLK_RESTORED_OFF 0x0040 // by AudioFlinger // Important: do not add any virtual methods, including ~ struct audio_track_cblk_t { Loading services/audioflinger/AudioFlinger.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -3291,9 +3291,10 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( AudioFlinger::ThreadBase::TrackBase::~TrackBase() { if (mCblk != NULL) { mCblk->~audio_track_cblk_t(); // destroy our shared-structure. if (mClient == NULL) { if (mClient == 0) { delete mCblk; } else { mCblk->~audio_track_cblk_t(); // destroy our shared-structure. } } mCblkMemory.clear(); // and free the shared memory Loading Loading @@ -6915,6 +6916,7 @@ void AudioFlinger::EffectHandle::disconnect(bool unpiniflast) mEffect.clear(); if (mClient != 0) { if (mCblk != NULL) { // unlike ~TrackBase(), mCblk is never a local new, so don't delete mCblk->~effect_param_cblk_t(); // destroy our shared-structure. } mCblkMemory.clear(); // and free the shared memory Loading Loading
include/private/media/AudioTrackShared.h +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ namespace android { #define CBLK_RESTORED_ON 0x0040 // track has been restored after invalidation #define CBLK_RESTORED_OFF 0x0040 // by AudioFlinger // Important: do not add any virtual methods, including ~ struct audio_track_cblk_t { Loading
services/audioflinger/AudioFlinger.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -3291,9 +3291,10 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( AudioFlinger::ThreadBase::TrackBase::~TrackBase() { if (mCblk != NULL) { mCblk->~audio_track_cblk_t(); // destroy our shared-structure. if (mClient == NULL) { if (mClient == 0) { delete mCblk; } else { mCblk->~audio_track_cblk_t(); // destroy our shared-structure. } } mCblkMemory.clear(); // and free the shared memory Loading Loading @@ -6915,6 +6916,7 @@ void AudioFlinger::EffectHandle::disconnect(bool unpiniflast) mEffect.clear(); if (mClient != 0) { if (mCblk != NULL) { // unlike ~TrackBase(), mCblk is never a local new, so don't delete mCblk->~effect_param_cblk_t(); // destroy our shared-structure. } mCblkMemory.clear(); // and free the shared memory Loading