1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-30 05:54:26 -04:00

SSB Modulator: working... restored file play loop after correction in CW Keyer GUI

This commit is contained in:
f4exb
2016-12-14 02:57:47 +01:00
parent 5000e01063
commit b45ecd2418
5 changed files with 58 additions and 13 deletions
+17 -6
View File
@@ -126,7 +126,8 @@ void SSBMod::configure(MessageQueue* messageQueue,
bool audioBinaural,
bool audioFlipChannels,
bool dsb,
bool audioMute)
bool audioMute,
bool playLoop)
{
Message* cmd = MsgConfigureSSBMod::create(bandwidth,
lowCutoff,
@@ -136,7 +137,8 @@ void SSBMod::configure(MessageQueue* messageQueue,
audioBinaural,
audioFlipChannels,
dsb,
audioMute);
audioMute,
playLoop);
messageQueue->push(cmd);
}
@@ -218,6 +220,15 @@ 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);
@@ -482,6 +493,7 @@ 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();
@@ -496,7 +508,8 @@ 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_audioMute: " << m_config.m_audioMute
<< " m_playLoop: " << m_config.m_playLoop;
return true;
}
@@ -551,9 +564,6 @@ void SSBMod::apply()
(m_config.m_audioSampleRate != m_running.m_audioSampleRate))
{
m_settingsMutex.lock();
// m_SSBFilter = new fftfilt(m_config.m_lowCutoff / m_config.m_audioSampleRate, m_config.m_bandwidth / m_config.m_audioSampleRate, m_ssbFftLen);
// m_DSBFilter = new fftfilt((2.0f * m_config.m_bandwidth) / m_config.m_audioSampleRate, 2 * m_ssbFftLen);
m_SSBFilter->create_filter(m_config.m_lowCutoff / m_config.m_audioSampleRate, m_config.m_bandwidth / m_config.m_audioSampleRate);
m_DSBFilter->create_dsb_filter((2.0f * m_config.m_bandwidth) / m_config.m_audioSampleRate);
m_settingsMutex.unlock();
@@ -619,6 +629,7 @@ 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()