Skip to content
Snippets Groups Projects
Commit cdf0ec6b authored by SeeLook's avatar SeeLook
Browse files

Android: Fixed hang on, when app was exiting and audio input was active

parent 9be712d6
No related branches found
No related tags found
No related merge requests found
......@@ -68,13 +68,14 @@ TaudioIN::~TaudioIN() {
stopListening();
m_audioIN->stop();
finder()->blockSignals(true);
if (m_thread->isRunning()) {
m_thread->wait(10);
if (m_thread->isRunning()) { // In fact, it never goes here
qDebug() << "Terminating audio input thread";
m_thread->terminate();
m_thread->quit();
stopThread();
}
m_audioParams->INdevName = m_deviceName; // store device name at the app exit
m_thread->deleteLater();
delete m_thread;
m_instance = 0;
}
......@@ -153,14 +154,14 @@ void TaudioIN::startThread() {
void TaudioIN::stopThread() {
// if (detectingState() != e_stopped) {
m_audioIN->stop();
if (m_buffer) {
delete m_buffer;
m_buffer = 0;
}
resetVolume();
resetChunkPitch();
finder()->resetFinder();
// }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment