Browse Source

Fixed audio output management by deleting the QAudioOutput when it is not used anymore

chirpmodem-v8.0.0
f4exb 10 years ago
parent
commit
afffc2cda8
  1. 4
      sdrbase/audio/audiooutput.cpp

4
sdrbase/audio/audiooutput.cpp

@ -113,6 +113,8 @@ bool AudioOutput::start(int device, int rate) @@ -113,6 +113,8 @@ bool AudioOutput::start(int device, int rate)
void AudioOutput::stop()
{
qDebug("AudioOutput::stop");
QMutexLocker mutexLocker(&m_mutex);
if (m_audioUsageCount > 0)
@ -122,7 +124,7 @@ void AudioOutput::stop() @@ -122,7 +124,7 @@ void AudioOutput::stop()
if (m_audioUsageCount == 0)
{
QIODevice::close();
// delete m_audioOutput;
delete m_audioOutput;
}
}
}

Loading…
Cancel
Save