refs #129 , start method as proposed by RW in https://dev.vatsim-germany.org/issues/129#note-4 , using lambda.

On top addded a simple check to avoid overlapping SELCAL tones
This commit is contained in:
Klaus Basan
2014-02-11 23:20:05 +01:00
parent 273b8d2d71
commit 7d600d4450
2 changed files with 11 additions and 10 deletions

View File

@@ -12,6 +12,7 @@
#include <QIODevice>
#include <QThread>
#include <QDateTime>
#include <QAudioFormat>
#include <QAudioOutput>
#include <QAudioDeviceInfo>
@@ -242,13 +243,6 @@ namespace BlackSound
void startInOwnThread(int volume);
signals:
/*!
* \brief Used to start in own thread
* \param volume 0..100
* \param pull
* \remarks only works with push, but signature has to be identical with CSoundGenerator::start
*/
void startThread(int volume, bool pull);
//! \brief Generator is stopping
void stopping();
@@ -278,6 +272,7 @@ namespace BlackSound
QTimer *m_pushTimer; /*!< Push mode timer */
QIODevice *m_pushModeIODevice; /*!< IO device when used in push mode */
QThread *m_ownThread;
static QDateTime selcalStarted;
/*!
* \brief Duration of these tones