Fix issues from previous ten runs.
parent
0574bd6010
commit
d4d056ac0c
|
@ -195,8 +195,8 @@ wxString utTxFile;
|
|||
wxString utRxFile;
|
||||
wxString utTxFeatureFile;
|
||||
wxString utRxFeatureFile;
|
||||
int utTxTimeSeconds;
|
||||
int utTxAttempts;
|
||||
long utTxTimeSeconds;
|
||||
long utTxAttempts;
|
||||
|
||||
// WxWidgets - initialize the application
|
||||
|
||||
|
@ -476,7 +476,7 @@ bool MainApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
|||
log_info("Piping %s through TX pipeline", (const char*)utTxFile.ToUTF8());
|
||||
}
|
||||
|
||||
if (parser.Found("txtime", (long*)&utTxTimeSeconds))
|
||||
if (parser.Found("txtime", &utTxTimeSeconds))
|
||||
{
|
||||
log_info("Will transmit for %d seconds", utTxTimeSeconds);
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ bool MainApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
|||
utTxTimeSeconds = 60;
|
||||
}
|
||||
|
||||
if (parser.Found("txattempts", (long*)&utTxAttempts))
|
||||
if (parser.Found("txattempts", &utTxAttempts))
|
||||
{
|
||||
log_info("Will transmit %d time(s)", utTxAttempts);
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ PlaybackStep::PlaybackStep(
|
|||
// Pre-allocate buffers so we don't have to do so during real-time operation.
|
||||
auto maxSamples = std::max(getInputSampleRate(), getOutputSampleRate());
|
||||
outputSamples_ = std::shared_ptr<short>(
|
||||
new short[maxSamples],
|
||||
std::default_delete<short[]>());
|
||||
AllocRealtime_<short>(maxSamples),
|
||||
RealtimeDeleter<short>());
|
||||
assert(outputSamples_ != nullptr);
|
||||
|
||||
// Create output FIFO
|
||||
|
@ -64,13 +64,9 @@ PlaybackStep::~PlaybackStep()
|
|||
{
|
||||
nonRtThread_.join();
|
||||
}
|
||||
|
||||
if (playbackResampler_ != nullptr)
|
||||
{
|
||||
delete playbackResampler_;
|
||||
}
|
||||
|
||||
codec2_fifo_destroy(outputFifo_);
|
||||
outputSamples_ = nullptr;
|
||||
}
|
||||
|
||||
int PlaybackStep::getInputSampleRate() const
|
||||
|
@ -160,6 +156,12 @@ void PlaybackStep::nonRtThreadEntry_()
|
|||
|
||||
std::this_thread::sleep_for(100ms);
|
||||
}
|
||||
|
||||
if (playbackResampler_ != nullptr)
|
||||
{
|
||||
delete playbackResampler_;
|
||||
playbackResampler_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void PlaybackStep::reset()
|
||||
|
|
|
@ -322,11 +322,11 @@ class HamlibHandler:
|
|||
self.ErrParam()
|
||||
else:
|
||||
if (not x) and self.app.ptt:
|
||||
# Sleep for 20ms to match typical SDR behavior + 30ms to account for varying system load/virtual audio latency.
|
||||
# Sleep for 20ms to match typical SDR behavior + 60ms to account for varying system load/virtual audio latency.
|
||||
# References:
|
||||
# Virtual audio latency: https://vb-audio.com/Cable/VBCABLE_ReferenceManual.pdf (assuming 10ms/512 sample buffer size @ 48 kHz)
|
||||
# Virtual audio latency: https://vb-audio.com/Cable/VBCABLE_ReferenceManual.pdf (assuming 20ms/1024 sample buffer size @ 48 kHz)
|
||||
# Example TX->RX switching time: Flex 6000/8000 (https://community.flexradio.com/discussion/8028104/question-regarding-tx-delay)
|
||||
time.sleep(50 / 1000)
|
||||
time.sleep(80 / 1000)
|
||||
os.kill(self.pid, signal.SIGTERM)
|
||||
if x:
|
||||
self.app.ptt = 1
|
||||
|
|
Loading…
Reference in New Issue