mPlayerAvailable = false;
mPlayUtterance = nullptr;
+ mThreadCond.notify_all();
+
tryToStopPlayer();
SLOG(LOG_INFO, tts_tag(), "[PlayerThread] Thread is stopped or waiting");
- mThreadCond.notify_all();
mPlayerThread.join();
SLOG(LOG_INFO, tts_tag(), "[PlayerThread] Finish thread");
}
SLOG(LOG_INFO, tts_tag(), "[PlayerThread] Wait playing");
if (isThreadStopped()) {
mThreadCond.wait(lock);
+ usleep(10000);
}
while (false == isThreadStopped()) {
mPlayUtterance(this, uid);
}
+ SLOG(LOG_INFO, tts_tag(), "[PlayerThread] notify stopCheckCond");
mStopCheckCond.notify_all();
}
}