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()) { if (!isOffloaded_l()) {
t->pause(); t->pause();
} else if (mTransfer == TRANSFER_SYNC_NOTIF_CALLBACK) { } else if (mTransfer == TRANSFER_SYNC_NOTIF_CALLBACK) {
const sp<AudioTrackThread> t = mAudioTrackThread; // causes wake up of the playback thread, that will callback the client for
if (t != 0) { // EVENT_STREAM_END in processAudioBuffer()
// causes wake up of the playback thread, that will callback the client for t->wake();
// EVENT_STREAM_END in processAudioBuffer()
t->wake();
}
} }
} else { } else {
setpriority(PRIO_PROCESS, 0, mPreviousPriority); setpriority(PRIO_PROCESS, 0, mPreviousPriority);

Loading…
Cancel
Save