Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cruxus - close output device
It looks like the code for closing device was forgotten. The device
stayed open for some time and alsactl and sound routing was not
working in incoming gsm call then.
  • Loading branch information
radekp committed Feb 6, 2012
1 parent 04315e3 commit 0077782
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/plugins/mediaengines/cruxus/cruxusoutputthread.cpp
Expand Up @@ -88,6 +88,7 @@ class OutputThreadPrivate : public QThread

void suspend();
void resume();
void close();

protected:
void run();
Expand Down Expand Up @@ -233,6 +234,16 @@ void OutputThreadPrivate::resume()
qLog(Media) << "OutputThreadPrivate::resume()";
}

void OutputThreadPrivate::close()
{
if(audioOutput && opened) {
QMutexLocker lock(&mutex);
opened = false;
audioOutput->close();
}
qLog(Media) << "OutputThreadPrivate::close()";
}

inline int OutputThreadPrivate::readFromDevice
(
QMediaDevice* device,
Expand Down Expand Up @@ -379,6 +390,7 @@ bool OutputThread::open(QIODevice::OpenMode mode)

void OutputThread::close()
{
d->close();
}

// private slots:
Expand Down

0 comments on commit 0077782

Please sign in to comment.