Squashed yet more compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3979 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-04-03 20:06:30 +00:00
parent 25d0429b36
commit da419014e0
4 changed files with 26 additions and 67 deletions

View File

@ -90,7 +90,6 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid,
int fQSO, int nsetftx, int ntxFreq)
{
static int ntxFreq0=-99;
static bool astroBusy=false;
double azsun,elsun,azmoon,elmoon,azmoondx,elmoondx;
double ramoon,decmoon,dgrd,poloffset,xnr,techo;
int ntsky,ndop,ndop00;
@ -108,15 +107,10 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid,
int nfreq=10368;
if(nfreq<10 or nfreq > 50000) nfreq=144;
if(!astroBusy) {
astroBusy=true;
astrosub_(&nyear, &month, &nday, &uth, &nfreq, mygrid.toLatin1(),
hisgrid.toLatin1(), &azsun, &elsun, &azmoon, &elmoon,
&azmoondx, &elmoondx, &ntsky, &ndop, &ndop00,&ramoon, &decmoon,
&dgrd, &poloffset, &xnr, &techo, 6, 6);
astroBusy=false;
}
QString message;
{

View File

@ -92,7 +92,6 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
m_dialFreq {0},
m_detector (RX_SAMPLE_RATE, NTMAX / 2, 6912 / 2, downSampleFactor),
m_modulator (TX_SAMPLE_RATE, NTMAX / 2),
m_soundOutput (&m_modulator),
m_audioThread {new QThread},
m_appDir {QApplication::applicationDirPath ()},
mem_jt9 {shdmem},

View File

@ -46,20 +46,10 @@ bool SoundOutput::audioError () const
return result;
}
SoundOutput::SoundOutput (QIODevice * source)
: m_active (false)
, m_currentDevice (QAudioDeviceInfo::defaultOutputDevice ())
{
Q_ASSERT (source);
}
void SoundOutput::setFormat (QAudioDeviceInfo const& device, unsigned channels, unsigned msBuffered)
{
Q_ASSERT (0 < channels && channels < 3);
if (!m_stream || device != m_currentDevice ||
channels != static_cast<unsigned> (m_stream->format ().channelCount ()))
{
QAudioFormat format (device.preferredFormat ());
format.setChannelCount (channels);
@ -83,9 +73,7 @@ void SoundOutput::setFormat (QAudioDeviceInfo const& device, unsigned channels,
connect (m_stream.data(), &QAudioOutput::stateChanged, this, &SoundOutput::handleStateChanged);
m_currentDevice = device;
// qDebug() << "A" << m_volume << m_stream->notifyInterval();
}
//
// This buffer size is critical since for proper sound streaming. If
@ -153,21 +141,17 @@ void SoundOutput::handleStateChanged (QAudio::State newState)
{
case QAudio::IdleState:
Q_EMIT status (tr ("Idle"));
m_active = false;
break;
case QAudio::ActiveState:
m_active = true;
Q_EMIT status (tr ("Sending"));
break;
case QAudio::SuspendedState:
m_active = true;
Q_EMIT status (tr ("Suspended"));
break;
case QAudio::StoppedState:
m_active = false;
if (audioError ())
{
Q_EMIT status (tr ("Error"));
@ -179,11 +163,3 @@ void SoundOutput::handleStateChanged (QAudio::State newState)
break;
}
}
SoundOutput::~SoundOutput ()
{
if (m_stream)
{
m_stream->stop ();
}
}

View File

@ -16,14 +16,7 @@ class SoundOutput
{
Q_OBJECT;
Q_PROPERTY(bool running READ isRunning);
Q_PROPERTY(unsigned attenuation READ attenuation WRITE setAttenuation RESET resetAttenuation);
public:
SoundOutput (QIODevice * source);
~SoundOutput ();
bool isRunning() const {return m_active;}
qreal attenuation () const;
QAudioOutput * stream () {return m_stream.data ();}
@ -46,9 +39,6 @@ private Q_SLOTS:
private:
QScopedPointer<QAudioOutput> m_stream;
bool volatile m_active;
QAudioDeviceInfo m_currentDevice;
qreal m_volume;
};