Fix double track thread initialization

Bug: 119870459
Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioTrackOffloadTest
Change-Id: I15f314ee5696ead90a09991bfe10e1ae3ff013e0
gugelfrei
Jean-Michel Trivi 6 years ago
parent 2a6038e529
commit 0248a2a3ae

@ -811,12 +811,9 @@ void AudioTrack::stop()
if (!isOffloaded_l()) {
t->pause();
} else if (mTransfer == TRANSFER_SYNC_NOTIF_CALLBACK) {
const sp<AudioTrackThread> t = mAudioTrackThread;
if (t != 0) {
// causes wake up of the playback thread, that will callback the client for
// EVENT_STREAM_END in processAudioBuffer()
t->wake();
}
// causes wake up of the playback thread, that will callback the client for
// EVENT_STREAM_END in processAudioBuffer()
t->wake();
}
} else {
setpriority(PRIO_PROCESS, 0, mPreviousPriority);

Loading…
Cancel
Save