Skip to content

Commit

Permalink
added zmq_audiosender class and removed the code that was doing the s…
Browse files Browse the repository at this point in the history
…ame thing in mainwindow (untested). tidy
  • Loading branch information
jontio committed Jul 26, 2021
1 parent eb76851 commit 7b87374
Show file tree
Hide file tree
Showing 16 changed files with 257 additions and 262 deletions.
10 changes: 6 additions & 4 deletions JAERO/JAERO.pro
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ SOURCES += mainwindow.cpp \
$$JFFT_PATH/jfft.cpp \
util/stdio_utils.cpp \
util/file_utils.cpp \
util/RuntimeError.cpp\
audioreceiver.cpp
util/RuntimeError.cpp \
zmq_audiosender.cpp \
zmq_audioreceiver.cpp


HEADERS += mainwindow.h \
Expand Down Expand Up @@ -121,8 +122,9 @@ HEADERS += mainwindow.h \
$$JFFT_PATH/jfft.h \
util/stdio_utils.h \
util/file_utils.h \
util/RuntimeError.h\
audioreceiver.h
util/RuntimeError.h \
zmq_audioreceiver.h \
zmq_audiosender.h


# Tell the qcustomplot header that it will be used as library:
Expand Down
13 changes: 6 additions & 7 deletions JAERO/audioburstmskdemodulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@
#include <QDebug>

AudioBurstMskDemodulator::AudioBurstMskDemodulator(QObject *parent)
: BurstMskDemodulator(parent),
m_audioInput(NULL)
: BurstMskDemodulator(parent),
m_audioInput(NULL)
{
//
//
}

void AudioBurstMskDemodulator::start()
{
BurstMskDemodulator::start();
if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->start(this);
}
if(m_audioInput)m_audioInput->start(this);
}
}

void AudioBurstMskDemodulator::stop()
{
if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->stop();

if(m_audioInput)m_audioInput->stop();
}
BurstMskDemodulator::stop();
}
Expand Down
13 changes: 6 additions & 7 deletions JAERO/audioburstoqpskdemodulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <QDebug>

AudioBurstOqpskDemodulator::AudioBurstOqpskDemodulator(QObject *parent)
: BurstOqpskDemodulator(parent),
m_audioInput(NULL)
: BurstOqpskDemodulator(parent),
m_audioInput(NULL)
{
demod2=new BurstOqpskDemodulator(this);
demod2->channel_select_other=true;
Expand All @@ -17,17 +17,16 @@ void AudioBurstOqpskDemodulator::start()
demod2->start();
if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->start(this);
}
if(m_audioInput)m_audioInput->start(this);
}
}

void AudioBurstOqpskDemodulator::stop()
{
if(m_audioInput)m_audioInput->stop();
if(!settings.zmqAudio)
{

BurstOqpskDemodulator::stop();
BurstOqpskDemodulator::stop();
}
demod2->stop();
}
Expand All @@ -47,7 +46,7 @@ void AudioBurstOqpskDemodulator::setSettings(Settings _settings)
//set the format
m_format.setSampleRate(settings.Fs);
if(settings.channel_stereo)m_format.setChannelCount(2);
else m_format.setChannelCount(1);
else m_format.setChannelCount(1);
m_format.setSampleSize(16);
m_format.setCodec("audio/pcm");
m_format.setByteOrder(QAudioFormat::LittleEndian);
Expand Down
13 changes: 6 additions & 7 deletions JAERO/audiomskdemodulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@
#include <QDebug>

AudioMskDemodulator::AudioMskDemodulator(QObject *parent)
: MskDemodulator(parent),
m_audioInput(NULL)
: MskDemodulator(parent),
m_audioInput(NULL)
{
//
//
}

void AudioMskDemodulator::start()
{
MskDemodulator::start();
if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->start(this);
}
if(m_audioInput)m_audioInput->start(this);
}
}

void AudioMskDemodulator::stop()
{
if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->stop();

if(m_audioInput)m_audioInput->stop();
}
MskDemodulator::stop();
}
Expand Down
13 changes: 6 additions & 7 deletions JAERO/audiooqpskdemodulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include <QDebug>

AudioOqpskDemodulator::AudioOqpskDemodulator(QObject *parent)
: OqpskDemodulator(parent),
m_audioInput(NULL)
: OqpskDemodulator(parent),
m_audioInput(NULL)
{
//
//
}

void AudioOqpskDemodulator::start()
Expand All @@ -15,17 +15,16 @@ void AudioOqpskDemodulator::start()

if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->start(this);
}
if(m_audioInput)m_audioInput->start(this);
}

}

void AudioOqpskDemodulator::stop()
{
if(!settings.zmqAudio)
{
if(m_audioInput)m_audioInput->stop();

if(m_audioInput)m_audioInput->stop();
}
OqpskDemodulator::stop();
}
Expand Down
Loading

0 comments on commit 7b87374

Please sign in to comment.