git-svn-id: https://svn.code.sf.net/p/freetel/code@915 01035d8c-6547-0410-b346-abe4f9...
authorwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 1 Nov 2012 22:31:35 +0000 (22:31 +0000)
committerwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 1 Nov 2012 22:31:35 +0000 (22:31 +0000)
fdmdv2/build/fdmdv2.workspace
fdmdv2/build/fdmdv2_wsp.mk
fdmdv2/tests/pa_enum/AudioOptsDialog.cpp
fdmdv2/tests/pa_enum/main.cpp
fdmdv2/tests/pa_enum/main.h
fdmdv2/tests/pa_enum/pa_enum.mk
fdmdv2/tests/pa_enum/pa_enum.txt

index ff79c6f655880afcebf5fc004ffc330a2985fec8..82b31d8aecdb38029cabc98d18f10989b024b4db 100644 (file)
@@ -8,13 +8,13 @@
   <Project Name="pa_enum" Path="../tests/pa_enum/pa_enum.project" Active="Yes"/>
   <Project Name="appWithDlg" Path="../tests/appWithDlg/appWithDlg.project" Active="No"/>
   <BuildMatrix>
-    <WorkspaceConfiguration Name="Debug" Selected="yes">
+    <WorkspaceConfiguration Name="Debug" Selected="no">
       <Project Name="fdmdv2" ConfigName="Debug"/>
       <Project Name="rawbits" ConfigName="Debug"/>
       <Project Name="pa_enum" ConfigName="Debug"/>
       <Project Name="appWithDlg" ConfigName="Debug"/>
     </WorkspaceConfiguration>
-    <WorkspaceConfiguration Name="Release" Selected="no">
+    <WorkspaceConfiguration Name="Release" Selected="yes">
       <Project Name="fdmdv2" ConfigName="Release"/>
       <Project Name="rawbits" ConfigName="Release"/>
       <Project Name="pa_enum" ConfigName="Release"/>
index e7ba3f481f187b8ecabe9112bd3523a3f0e6af49..332ad0d5d1e30207e24e4e085aa861f54ef24acb 100644 (file)
@@ -1,8 +1,8 @@
 .PHONY: clean All
 
 All:
-       @echo ----------Building project:[ pa_enum - Debug ]----------
+       @echo ----------Building project:[ pa_enum - Release ]----------
        @cd "C:\bin\Projects\Radio\fdmdv2\tests\pa_enum" && "$(MAKE)" -f "pa_enum.mk"
 clean:
-       @echo ----------Cleaning project:[ pa_enum - Debug ]----------
+       @echo ----------Cleaning project:[ pa_enum - Release ]----------
        @cd "C:\bin\Projects\Radio\fdmdv2\tests\pa_enum" && "$(MAKE)" -f "pa_enum.mk" clean
index ae14e1721d648ef024145556064caf09142224f8..6cc358092661d7f4888a44950e047c9f71700282 100644 (file)
@@ -315,7 +315,7 @@ AudioOptsDialog::~AudioOptsDialog()
 void AudioOptsDialog::OnInitDialog( wxInitDialogEvent& event )
 {
     ExchangeData(EXCHANGE_DATA_IN);
-    populateAudioInfo();
+    //populateAudioInfo();
 }
 
 //-------------------------------------------------------------------------
@@ -326,17 +326,17 @@ void AudioOptsDialog::ExchangeData(int inout)
     wxConfigBase *pConfig = wxConfigBase::Get();
     if(inout == EXCHANGE_DATA_IN)
     {
-        m_textRxInput->SetValue(wxGetApp().m_strRxInAudio);
-        m_textTxOutput->SetValue(wxGetApp().m_strRxOutAudio);
-        m_textVoiceInput->SetValue(wxGetApp().m_textVoiceInput);
-        m_textVoiceOutput->SetValue(wxGetApp().m_textVoiceOutput);
+        m_textCtrlRxIn->SetValue(wxGetApp().m_strRxInAudio);
+        m_textCtrlRxOut->SetValue(wxGetApp().m_strRxOutAudio);
+        m_textCtrlTxIn->SetValue(wxGetApp().m_textVoiceInput);
+        m_textCtrlTxOut->SetValue(wxGetApp().m_textVoiceOutput);
     }
     if(inout == EXCHANGE_DATA_OUT)
     {
-        wxGetApp().m_strRxInAudio    = m_textRxInput->GetValue();
-        wxGetApp().m_strRxOutAudio   = m_textTxOutput->GetValue();
-        wxGetApp().m_textVoiceInput  = m_textVoiceInput->GetValue();
-        wxGetApp().m_textVoiceOutput = m_textVoiceOutput->GetValue();
+        wxGetApp().m_strRxInAudio    = m_textCtrlRxIn->GetValue();
+        wxGetApp().m_strRxOutAudio   = m_textCtrlRxOut->GetValue();
+        wxGetApp().m_textVoiceInput  = m_textCtrlTxIn->GetValue();
+        wxGetApp().m_textVoiceOutput = m_textCtrlTxOut->GetValue();
 
         pConfig->Write(wxT("/Audio/RxIn"),          wxGetApp().m_strRxInAudio);
         pConfig->Write(wxT("/Audio/RxOut"),         wxGetApp().m_strRxOutAudio);
@@ -665,6 +665,7 @@ void AudioOptsDialog::OnRefreshClick(wxCommandEvent& event)
 //-------------------------------------------------------------------------\r
 void AudioOptsDialog::OnApplyAudioParameters(wxCommandEvent& event)\r
 {\r
+    ExchangeData(EXCHANGE_DATA_OUT);
     if(m_isPaInitialized)\r
     {\r
         if((pa_err = Pa_Terminate()) == paNoError)\r
@@ -702,6 +703,7 @@ void AudioOptsDialog::OnCancelAudioParameters(wxCommandEvent& event)
 //-------------------------------------------------------------------------\r
 void AudioOptsDialog::OnOkAudioParameters(wxCommandEvent& event)\r
 {\r
+    ExchangeData(EXCHANGE_DATA_OUT);
     if(m_isPaInitialized)\r
     {\r
         if((pa_err = Pa_Terminate()) == paNoError)\r
index 90235bc22c4da74c7aaa22f969a153b649a99518..f4ce742bcabbf1bc8e4fd70d842f4c4c0eb39c9d 100644 (file)
@@ -32,6 +32,32 @@ bool MainApp::OnInit()
 MainFrame::MainFrame(wxWindow *parent) : MainFrameBase(parent)\r
 {\r
     wxInitAllImageHandlers();\r
+    wxConfigBase *pConfig = wxConfigBase::Get();
+
+    // restore frame position and size
+//    int x = pConfig->Read(wxT("/MainFrame/top"),       50);
+//    int y = pConfig->Read(wxT("/MainFrame/left"),      50);
+//    int w = pConfig->Read(wxT("/MainFrame/width"),     650);
+//    int h = pConfig->Read(wxT("/MainFrame/height"),    400);
+//    wxGetApp().m_show_wf      = pConfig->Read(wxT("/MainFrame/show_wf"),      1);
+//    wxGetApp().m_show_spect   = pConfig->Read(wxT("/MainFrame/show_spect"),   1);
+//    wxGetApp().m_show_scatter = pConfig->Read(wxT("/MainFrame/show_scatter"), 1);
+//    wxGetApp().m_show_timing  = pConfig->Read(wxT("/MainFrame/show_timing"),  1);
+//    wxGetApp().m_show_freq    = pConfig->Read(wxT("/MainFrame/show_freq"),    1);
+\r
+    wxGetApp().m_strRxInAudio       = pConfig->Read(wxT("/Audio/RxIn"),         wxT("<m_strRxInAudio>"));
+    wxGetApp().m_strRxOutAudio      = pConfig->Read(wxT("/Audio/RxOut"),        wxT("<m_strRxOutAudio>"));
+    wxGetApp().m_textVoiceInput     = pConfig->Read(wxT("/Audio/TxIn"),         wxT("<m_textVoiceInput>"));
+    wxGetApp().m_textVoiceOutput    = pConfig->Read(wxT("/Audio/TxOut"),        wxT("<m_textVoiceOutput>"));
+    wxGetApp().m_strSampleRate      = pConfig->Read(wxT("/Audio/SampleRate"),   wxT("48000"));
+
+//    wxGetApp().m_strRigCtrlPort     = pConfig->Read("/Rig/Port",                wxT("\\\\.\\com1"));
+//    wxGetApp().m_strRigCtrlBaud     = pConfig->Read("/Rig/Baud",                wxT("9600"));
+//    wxGetApp().m_strRigCtrlDatabits = pConfig->Read("/Rig/DataBits",            wxT("8"));
+//    wxGetApp().m_strRigCtrlStopbits = pConfig->Read("/Rig/StopBits",            wxT("1"));
+//    wxGetApp().m_strRigCtrlParity   = pConfig->Read("/Rig/Parity",              wxT("n"));
+
+    pConfig->SetPath(wxT("/"));
 \r
     this->Connect(ID_AUDIO_OPTIONS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAudioOptsDialog));\r
 }\r
@@ -42,6 +68,33 @@ MainFrame::MainFrame(wxWindow *parent) : MainFrameBase(parent)
 MainFrame::~MainFrame()\r
 {\r
     this->Disconnect(ID_AUDIO_OPTIONS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAudioOptsDialog));\r
+    wxConfigBase *pConfig = wxConfigBase::Get();
+    if(pConfig)
+    {
+//        GetClientSize(&w, &h);
+//        GetPosition(&x, &y);
+//        pConfig->Write(wxT("/MainFrame/top"),           (long) x);
+//        pConfig->Write(wxT("/MainFrame/left"),          (long) y);
+//        pConfig->Write(wxT("/MainFrame/width"),         (long) w);
+//        pConfig->Write(wxT("/MainFrame/height"),        (long) h);
+//        pConfig->Write(wxT("/MainFrame/show_wf"),       wxGetApp().m_show_wf);
+//        pConfig->Write(wxT("/MainFrame/show_spect"),    wxGetApp().m_show_spect);
+//        pConfig->Write(wxT("/MainFrame/show_scatter"),  wxGetApp().m_show_scatter);
+//        pConfig->Write(wxT("/MainFrame/show_timing"),   wxGetApp().m_show_timing);
+//        pConfig->Write(wxT("/MainFrame/show_freq"),     wxGetApp().m_show_freq);
+
+        pConfig->Write(wxT("/Audio/RxIn"),              wxGetApp().m_strRxInAudio);
+        pConfig->Write(wxT("/Audio/RxOut"),             wxGetApp().m_strRxOutAudio);
+        pConfig->Write(wxT("/Audio/TxIn"),              wxGetApp().m_textVoiceInput);
+        pConfig->Write(wxT("/Audio/TxOut"),             wxGetApp().m_textVoiceOutput);
+        pConfig->Write(wxT("/Audio/SampleRate"),        wxGetApp().m_strSampleRate);
+
+//        pConfig->Write(wxT("/Rig/Port"),                wxGetApp().m_strRigCtrlPort);
+//        pConfig->Write(wxT("/Rig/Baud"),                wxGetApp().m_strRigCtrlBaud);
+//        pConfig->Write(wxT("/Rig/DataBits"),            wxGetApp().m_strRigCtrlDatabits);
+//        pConfig->Write(wxT("/Rig/StopBits"),            wxGetApp().m_strRigCtrlStopbits);
+//        pConfig->Write(wxT("/Rig/Parity"),              wxGetApp().m_strRigCtrlParity);
+    }
 }\r
 \r
 //-------------------------------------------------------------------------
index cecba295c518b91713b03fb09d734ab0427c8855..48b6809fb3c3153de3da36a060bfc8c9f397b0fa 100644 (file)
@@ -18,6 +18,7 @@
 #include <wx/textctrl.h>\r
 #include <wx/artprov.h>\r
 #include <wx/xrc/xmlres.h>\r
+#include "wx/config.h"
 #include <wx/intl.h>\r
 #include <wx/listctrl.h>\r
 #include <wx/menu.h>\r
@@ -48,6 +49,12 @@ class MainApp : public wxApp
 {
     public:
         virtual bool OnInit();
+        wxString            m_strRxInAudio;
+        wxString            m_strRxOutAudio;
+        wxString            m_textVoiceInput;
+        wxString            m_textVoiceOutput;
+        wxString            m_strSampleRate;
+        wxString            m_strBitrate;
 };
 \r
 // declare global static function wxGetApp()
index 25bbabb87fb86373ff48ebc88783797639ebc458..3bdad048dff973b70a950908903a20f1ae898966 100644 (file)
@@ -2,18 +2,18 @@
 ## Auto Generated makefile by CodeLite IDE\r
 ## any manual changes will be erased      \r
 ##\r
-## Debug\r
+## Release\r
 ProjectName            :=pa_enum\r
-ConfigurationName      :=Debug\r
+ConfigurationName      :=Release\r
 WorkspacePath          := "C:\bin\Projects\Radio\fdmdv2\build"\r
 ProjectPath            := "C:\bin\Projects\Radio\fdmdv2\tests\pa_enum"\r
-IntermediateDirectory  :=./Debug\r
+IntermediateDirectory  :=./Release\r
 OutDir                 := $(IntermediateDirectory)\r
 CurrentFileName        :=\r
 CurrentFilePath        :=\r
 CurrentFileFullPath    :=\r
 User                   :=OFA-Staff\r
-Date                   :=10/26/2012\r
+Date                   :=11/1/2012\r
 CodeLitePath           :="C:\bin\CodeLite"\r
 LinkerName             :=g++\r
 SharedObjectLinkerName :=g++ -shared -fPIC\r
@@ -35,7 +35,7 @@ PreprocessOnlySwitch   :=-E
 ObjectsFileList        :="C:\bin\Projects\Radio\fdmdv2\tests\pa_enum\pa_enum.txt"\r
 PCHCompileFlags        :=\r
 MakeDirCommand         :=makedir\r
-LinkOptions            :=  -mwindows $(shell wx-config --debug=yes --libs --unicode=yes)\r
+LinkOptions            :=  -mwindows -s $(shell wx-config --debug=no --libs --unicode=yes)\r
 IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.6.1/msys/1.0/local/include $(IncludeSwitch)../../codec2-dev/src $(IncludeSwitch)/bin/Projects/Audio/libsndfile/ \r
 IncludePCH             := \r
 RcIncludePath          := \r
@@ -50,8 +50,8 @@ LibPath                := $(LibraryPathSwitch). $(LibraryPathSwitch)/bin/MinGW-4
 AR       := ar rcus\r
 CXX      := g++\r
 CC       := gcc\r
-CXXFLAGS :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"824\"  $(Preprocessors)\r
-CFLAGS   :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"824\"  $(Preprocessors)\r
+CXXFLAGS :=  -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no)  -DSVN_REVISION=\"886\"  $(Preprocessors)\r
+CFLAGS   :=  -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no)  -DSVN_REVISION=\"886\"  $(Preprocessors)\r
 \r
 \r
 ##\r
@@ -77,7 +77,7 @@ $(OutputFile): $(IntermediateDirectory)/.d $(Objects)
        $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)\r
 \r
 $(IntermediateDirectory)/.d:\r
-       @$(MakeDirCommand) "./Debug"\r
+       @$(MakeDirCommand) "./Release"\r
 \r
 PreBuild:\r
 \r
@@ -126,6 +126,6 @@ clean:
        $(RM) $(IntermediateDirectory)/AudioOptsDialog$(PreprocessSuffix)\r
        $(RM) $(OutputFile)\r
        $(RM) $(OutputFile).exe\r
-       $(RM) "C:\bin\Projects\Radio\fdmdv2\build\.build-debug\pa_enum"\r
+       $(RM) "C:\bin\Projects\Radio\fdmdv2\build\.build-release\pa_enum"\r
 \r
 \r
index b01c823d448d319ebc2664f547417b8a63ee2925..f7a900279bcdab540a5c457bc33faf4c5cbcb8d5 100644 (file)
@@ -1 +1 @@
-./Debug/gui.o ./Debug/main.o ./Debug/AudioOptsDialog.o  \r
+./Release/gui.o ./Release/main.o ./Release/AudioOptsDialog.o  \r