diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 19d32f0cf..a0b76024e 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -126,8 +126,7 @@ void SSBMod::configure(MessageQueue* messageQueue, bool audioBinaural, bool audioFlipChannels, bool dsb, - bool audioMute, - bool playLoop) + bool audioMute) { Message* cmd = MsgConfigureSSBMod::create(bandwidth, lowCutoff, @@ -137,8 +136,7 @@ void SSBMod::configure(MessageQueue* messageQueue, audioBinaural, audioFlipChannels, dsb, - audioMute, - playLoop); + audioMute); messageQueue->push(cmd); } @@ -220,15 +218,6 @@ void SSBMod::pullAF(Complex& sample) // ffplay -f f32le -ar 48k -ac 1 f4exb_call.raw if (m_ifstream.is_open()) { - if (m_ifstream.eof()) - { - if (m_running.m_playLoop) - { - m_ifstream.clear(); - m_ifstream.seekg(0, std::ios::beg); - } - } - if (m_ifstream.eof()) { ci.real(0.0f); @@ -493,7 +482,6 @@ bool SSBMod::handleMessage(const Message& cmd) m_config.m_audioFlipChannels = cfg.getAudioFlipChannels(); m_config.m_dsb = cfg.getDSB(); m_config.m_audioMute = cfg.getAudioMute(); - m_config.m_playLoop = cfg.getPlayLoop(); apply(); @@ -508,8 +496,7 @@ bool SSBMod::handleMessage(const Message& cmd) << " m_audioBinaural: " << m_config.m_audioBinaural << " m_audioFlipChannels: " << m_config.m_audioFlipChannels << " m_dsb: " << m_config.m_dsb - << " m_audioMute: " << m_config.m_audioMute - << " m_playLoop: " << m_config.m_playLoop; + << " m_audioMute: " << m_config.m_audioMute; return true; } @@ -632,7 +619,6 @@ void SSBMod::apply() m_running.m_audioFlipChannels = m_config.m_audioFlipChannels; m_running.m_dsb = m_config.m_dsb; m_running.m_audioMute = m_config.m_audioMute; - m_running.m_playLoop = m_config.m_playLoop; } void SSBMod::openFileStream() diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index cdf0c8386..33995cafe 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -186,8 +186,7 @@ public: bool audioBinaural, bool audioFlipChannels, bool dsb, - bool audioMute, - bool playLoop); + bool audioMute); virtual void pull(Sample& sample); virtual void start(); @@ -223,7 +222,6 @@ private: bool getAudioFlipChannels() const { return m_audioFlipChannels; } bool getDSB() const { return m_dsb; } bool getAudioMute() const { return m_audioMute; } - bool getPlayLoop() const { return m_playLoop; } static MsgConfigureSSBMod* create(Real bandwidth, Real lowCutoff, @@ -233,8 +231,7 @@ private: bool audioBinaural, bool audioFlipChannels, bool dsb, - bool audioMute, - bool playLoop) + bool audioMute) { return new MsgConfigureSSBMod(bandwidth, lowCutoff, @@ -244,8 +241,7 @@ private: audioBinaural, audioFlipChannels, dsb, - audioMute, - playLoop); + audioMute); } private: @@ -258,7 +254,6 @@ private: bool m_audioFlipChannels; bool m_dsb; bool m_audioMute; - bool m_playLoop; MsgConfigureSSBMod(Real bandwidth, Real lowCutoff, @@ -268,8 +263,7 @@ private: bool audioBinaural, bool audioFlipChannels, bool dsb, - bool audioMute, - bool playLoop) : + bool audioMute) : Message(), m_bandwidth(bandwidth), m_lowCutoff(lowCutoff), @@ -279,8 +273,7 @@ private: m_audioBinaural(audioBinaural), m_audioFlipChannels(audioFlipChannels), m_dsb(dsb), - m_audioMute(audioMute), - m_playLoop(playLoop) + m_audioMute(audioMute) { } }; @@ -311,7 +304,6 @@ private: bool m_audioFlipChannels; bool m_dsb; bool m_audioMute; - bool m_playLoop; Config() : m_outputSampleRate(0), @@ -326,8 +318,7 @@ private: m_audioBinaural(false), m_audioFlipChannels(false), m_dsb(false), - m_audioMute(false), - m_playLoop(false) + m_audioMute(false) { } }; diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index 4dd06cb66..56aa4c906 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -263,10 +263,19 @@ void SSBModGUI::on_dsb_toggled(bool checked) setNewRate(m_spanLog2); } +void SSBModGUI::on_spanLog2_valueChanged(int value) +{ + if (setNewRate(value)) + { + applySettings(); + } + +} + void SSBModGUI::on_BW_valueChanged(int value) { ui->BWText->setText(QString("%1 kHz").arg(value / 10.0, 0, 'f', 1)); - m_channelMarker.setBandwidth(value * 100); + m_channelMarker.setBandwidth(value * 200); applySettings(); } @@ -329,11 +338,6 @@ void SSBModGUI::on_audioMute_toggled(bool checked) applySettings(); } -void SSBModGUI::on_playLoop_toggled(bool checked) -{ - applySettings(); -} - void SSBModGUI::on_play_toggled(bool checked) { ui->tone->setEnabled(!checked); // release other source inputs @@ -594,8 +598,7 @@ void SSBModGUI::applySettings() ui->audioBinaural->isChecked(), ui->audioFlipChannels->isChecked(), ui->dsb->isChecked(), - ui->audioMute->isChecked(), - ui->playLoop->isChecked()); + ui->audioMute->isChecked()); } } diff --git a/plugins/channeltx/modssb/ssbmodgui.h b/plugins/channeltx/modssb/ssbmodgui.h index 4dc73e3f1..d393f7b32 100644 --- a/plugins/channeltx/modssb/ssbmodgui.h +++ b/plugins/channeltx/modssb/ssbmodgui.h @@ -62,6 +62,7 @@ private slots: void on_deltaFrequency_changed(quint64 value); void on_deltaMinus_toggled(bool minus); void on_dsb_toggled(bool checked); + void on_spanLog2_valueChanged(int value); void on_BW_valueChanged(int value); void on_lowCut_valueChanged(int value); void on_volume_valueChanged(int value); @@ -72,7 +73,6 @@ private slots: void on_play_toggled(bool checked); void on_morseKeyer_toggled(bool checked); - void on_playLoop_toggled(bool checked); void on_navTimeSlider_valueChanged(int value); void on_showFileDialog_clicked(bool checked); diff --git a/plugins/channeltx/modssb/ssbmodgui.ui b/plugins/channeltx/modssb/ssbmodgui.ui index 003e9a15c..47f9afde5 100644 --- a/plugins/channeltx/modssb/ssbmodgui.ui +++ b/plugins/channeltx/modssb/ssbmodgui.ui @@ -614,20 +614,6 @@ - - - - Play record file in a loop - - - ... - - - - :/playloop.png:/playloop.png - - -