Loading services/audioflinger/TrackBase.h +2 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public: pid_t creatorPid, uid_t uid, bool isOut, alloc_type alloc = ALLOC_CBLK, const alloc_type alloc = ALLOC_CBLK, track_type type = TYPE_DEFAULT, audio_port_handle_t portId = AUDIO_PORT_HANDLE_NONE, std::string metricsId = {}); Loading Loading @@ -350,6 +350,7 @@ protected: // this could be a track type if needed later const wp<ThreadBase> mThread; const alloc_type mAllocType; /*const*/ sp<Client> mClient; // see explanation at ~TrackBase() why not const sp<IMemory> mCblkMemory; audio_track_cblk_t* mCblk; Loading services/audioflinger/Tracks.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -90,12 +90,13 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( pid_t creatorPid, uid_t clientUid, bool isOut, alloc_type alloc, const alloc_type alloc, track_type type, audio_port_handle_t portId, std::string metricsId) : RefBase(), mThread(thread), mAllocType(alloc), mClient(client), mCblk(NULL), // mBuffer, mBufferSize Loading Loading @@ -276,6 +277,10 @@ AudioFlinger::ThreadBase::TrackBase::~TrackBase() // relying on the automatic clear() at end of scope. mClient.clear(); } if (mAllocType == ALLOC_LOCAL) { free(mBuffer); mBuffer = nullptr; } // flush the binder command buffer IPCThreadState::self()->flushCommands(); } Loading Loading
services/audioflinger/TrackBase.h +2 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public: pid_t creatorPid, uid_t uid, bool isOut, alloc_type alloc = ALLOC_CBLK, const alloc_type alloc = ALLOC_CBLK, track_type type = TYPE_DEFAULT, audio_port_handle_t portId = AUDIO_PORT_HANDLE_NONE, std::string metricsId = {}); Loading Loading @@ -350,6 +350,7 @@ protected: // this could be a track type if needed later const wp<ThreadBase> mThread; const alloc_type mAllocType; /*const*/ sp<Client> mClient; // see explanation at ~TrackBase() why not const sp<IMemory> mCblkMemory; audio_track_cblk_t* mCblk; Loading
services/audioflinger/Tracks.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -90,12 +90,13 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( pid_t creatorPid, uid_t clientUid, bool isOut, alloc_type alloc, const alloc_type alloc, track_type type, audio_port_handle_t portId, std::string metricsId) : RefBase(), mThread(thread), mAllocType(alloc), mClient(client), mCblk(NULL), // mBuffer, mBufferSize Loading Loading @@ -276,6 +277,10 @@ AudioFlinger::ThreadBase::TrackBase::~TrackBase() // relying on the automatic clear() at end of scope. mClient.clear(); } if (mAllocType == ALLOC_LOCAL) { free(mBuffer); mBuffer = nullptr; } // flush the binder command buffer IPCThreadState::self()->flushCommands(); } Loading