From 257240fbdc170ee13773308ea63d3a3f92394991 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 15 Sep 2015 07:15:01 +0000 Subject: [PATCH] fixed voice keyer path git-svn-id: https://svn.code.sf.net/p/freetel/code@2334 01035d8c-6547-0410-b346-abe4f91aad63 --- freedv-dev/src/dlg_ptt.cpp | 5 ++++- freedv-dev/src/fdmdv2_main.cpp | 2 ++ freedv-dev/src/fdmdv2_main.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/freedv-dev/src/dlg_ptt.cpp b/freedv-dev/src/dlg_ptt.cpp index 2b8f6ec9..138f63f2 100644 --- a/freedv-dev/src/dlg_ptt.cpp +++ b/freedv-dev/src/dlg_ptt.cpp @@ -457,7 +457,7 @@ void ComPortsDlg::OnApply(wxCommandEvent& event) wxFileDialog openFileDialog( this, wxT("Voice Keyer wave file"), - wxGetApp().m_txtVoiceKeyerWaveFile, + wxGetApp().m_txtVoiceKeyerWaveFilePath, wxEmptyString, wxT("WAV files (*.wav)|*.wav"), wxFD_SAVE @@ -466,6 +466,9 @@ void ComPortsDlg::OnApply(wxCommandEvent& event) return; // the user changed their mind... } + wxString fileName, extension; + wxGetApp().m_txtVoiceKeyerWaveFile = openFileDialog.GetPath(); + wxFileName::SplitPath(wxGetApp().m_txtVoiceKeyerWaveFile, &wxGetApp().m_txtVoiceKeyerWaveFilePath, &fileName, &extension); m_txtCtrlVoiceKeyerWaveFile->SetValue(wxGetApp().m_txtVoiceKeyerWaveFile); } diff --git a/freedv-dev/src/fdmdv2_main.cpp b/freedv-dev/src/fdmdv2_main.cpp index 1b397223..a45414a0 100644 --- a/freedv-dev/src/fdmdv2_main.cpp +++ b/freedv-dev/src/fdmdv2_main.cpp @@ -350,6 +350,7 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) wxGetApp().m_boolHalfDuplex = pConfig->ReadBool(wxT("/Rig/HalfDuplex"), true); wxGetApp().m_leftChannelVoxTone = pConfig->ReadBool("/Rig/leftChannelVoxTone", false); + wxGetApp().m_txtVoiceKeyerWaveFilePath = pConfig->Read(wxT("/VoiceKeyer/WaveFilePath"), wxT("")); wxGetApp().m_txtVoiceKeyerWaveFile = pConfig->Read(wxT("/VoiceKeyer/WaveFile"), wxT("voicekeyer.wav")); wxGetApp().m_intVoiceKeyerRxPause = pConfig->Read(wxT("/VoiceKeyer/RxPause"), 10); wxGetApp().m_intVoiceKeyerRepeats = pConfig->Read(wxT("/VoiceKeyer/Repeats"), 5); @@ -595,6 +596,7 @@ MainFrame::~MainFrame() pConfig->Write(wxT("/Audio/soundCard2OutDeviceNum"), g_soundCard2OutDeviceNum); pConfig->Write(wxT("/Audio/soundCard2SampleRate"), g_soundCard2SampleRate ); + pConfig->Write(wxT("/VoiceKeyer/WaveFilePath"), wxGetApp().m_txtVoiceKeyerWaveFilePath); pConfig->Write(wxT("/VoiceKeyer/WaveFile"), wxGetApp().m_txtVoiceKeyerWaveFile); pConfig->Write(wxT("/VoiceKeyer/RxPause"), wxGetApp().m_intVoiceKeyerRxPause); pConfig->Write(wxT("/VoiceKeyer/Repeats"), wxGetApp().m_intVoiceKeyerRepeats); diff --git a/freedv-dev/src/fdmdv2_main.h b/freedv-dev/src/fdmdv2_main.h index 72908f55..42a0b2bd 100644 --- a/freedv-dev/src/fdmdv2_main.h +++ b/freedv-dev/src/fdmdv2_main.h @@ -174,6 +174,7 @@ class MainApp : public wxApp bool m_boolHalfDuplex; + wxString m_txtVoiceKeyerWaveFilePath; wxString m_txtVoiceKeyerWaveFile; int m_intVoiceKeyerRxPause; int m_intVoiceKeyerRepeats; -- 2.25.1