From: wittend99 Date: Fri, 17 Aug 2012 20:50:00 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@625 01035d8c-6547-0410-b346-abe4f9... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=b68bac55d5a14db9c92ce79023a3eebed4663892;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@625 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/fdmdv2basic/Release/.gitignore b/fdmdv2/fdmdv2basic/Release/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/fdmdv2/fdmdv2basic/fdmdv2basic.mk b/fdmdv2/fdmdv2basic/fdmdv2basic.mk deleted file mode 100644 index 6359fa03..00000000 --- a/fdmdv2/fdmdv2basic/fdmdv2basic.mk +++ /dev/null @@ -1,125 +0,0 @@ -## -## Auto Generated makefile by CodeLite IDE -## any manual changes will be erased -## -## Release -ProjectName :=fdmdv2basic -ConfigurationName :=Release -IntermediateDirectory :=./Release -OutDir := $(IntermediateDirectory) -WorkspacePath := "C:\Users\wittend\Projects\Radio\fdmdv2" -ProjectPath := "C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2basic" -CurrentFileName := -CurrentFilePath := -CurrentFileFullPath := -User :=wittend -Date :=6/18/2012 -CodeLitePath :="C:\Program Files\CodeLite" -LinkerName :=g++ -ArchiveTool :=ar rcus -SharedObjectLinkerName :=g++ -shared -fPIC -ObjectSuffix :=.o -DependSuffix :=.o.d -PreprocessSuffix :=.o.i -DebugSwitch :=-gstab -IncludeSwitch :=-I -LibrarySwitch :=-l -OutputSwitch :=-o -LibraryPathSwitch :=-L -PreprocessorSwitch :=-D -SourceSwitch :=-c -CompilerName :=g++ -C_CompilerName :=gcc -OutputFile :=$(IntermediateDirectory)/$(ProjectName) -Preprocessors :=$(PreprocessorSwitch)__WX__ -ObjectSwitch :=-o -ArchiveOutputSwitch := -PreprocessOnlySwitch :=-E -ObjectsFileList :="C:\Users\wittend\Projects\Radio\fdmdv2\fdmdv2basic\fdmdv2basic.txt" -PCHCompileFlags := -MakeDirCommand :=makedir -CmpOptions := -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no) $(Preprocessors) -C_CmpOptions := -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no) $(Preprocessors) -LinkOptions := -mwindows -s $(shell wx-config --debug=no --libs --unicode=yes) -IncludePath := $(IncludeSwitch). $(IncludeSwitch)./../extern/include -IncludePCH := -RcIncludePath := -Libs := $(LibrarySwitch)sndfile-1 $(LibrarySwitch)codec2 $(LibrarySwitch)portaudio $(LibrarySwitch)portaudiocpp -LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)./../libsndfile/bin $(LibraryPathSwitch)./../extern/lib - - -## -## User defined environment variables -## -CodeLiteDir:=C:\Program Files\CodeLite -WXWIN:=C:\bin\wxWidgets-2.9.4 -PATH:=$(WXWIN)\lib\gcc_dll;$(PATH) -WXCFG:=gcc_dll\mswu -UNIT_TEST_PP_SRC_DIR:=C:\bin\UnitTest++-1.3 -Objects=$(IntermediateDirectory)/gui$(ObjectSuffix) $(IntermediateDirectory)/main$(ObjectSuffix) $(IntermediateDirectory)/paclass$(ObjectSuffix) - -## -## Main Build Targets -## -.PHONY: all clean PreBuild PrePreBuild PostBuild -all: $(OutputFile) - -$(OutputFile): $(IntermediateDirectory)/.d $(Objects) - @$(MakeDirCommand) $(@D) - @echo "" > $(IntermediateDirectory)/.d - @echo $(Objects) > $(ObjectsFileList) - $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions) - -$(IntermediateDirectory)/.d: - @$(MakeDirCommand) "./Release" - -PreBuild: - - -## -## Objects -## -$(IntermediateDirectory)/gui$(ObjectSuffix): gui.cpp $(IntermediateDirectory)/gui$(DependSuffix) - $(CompilerName) $(IncludePCH) $(SourceSwitch) "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/gui.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/gui$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/gui$(DependSuffix): gui.cpp - @$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/gui$(ObjectSuffix) -MF$(IntermediateDirectory)/gui$(DependSuffix) -MM "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/gui.cpp" - -$(IntermediateDirectory)/gui$(PreprocessSuffix): gui.cpp - @$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/gui$(PreprocessSuffix) "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/gui.cpp" - -$(IntermediateDirectory)/main$(ObjectSuffix): main.cpp $(IntermediateDirectory)/main$(DependSuffix) - $(CompilerName) $(IncludePCH) $(SourceSwitch) "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/main.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/main$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/main$(DependSuffix): main.cpp - @$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/main$(ObjectSuffix) -MF$(IntermediateDirectory)/main$(DependSuffix) -MM "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/main.cpp" - -$(IntermediateDirectory)/main$(PreprocessSuffix): main.cpp - @$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main$(PreprocessSuffix) "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/main.cpp" - -$(IntermediateDirectory)/paclass$(ObjectSuffix): paclass.cpp $(IntermediateDirectory)/paclass$(DependSuffix) - $(CompilerName) $(IncludePCH) $(SourceSwitch) "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/paclass.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/paclass$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/paclass$(DependSuffix): paclass.cpp - @$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/paclass$(ObjectSuffix) -MF$(IntermediateDirectory)/paclass$(DependSuffix) -MM "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/paclass.cpp" - -$(IntermediateDirectory)/paclass$(PreprocessSuffix): paclass.cpp - @$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/paclass$(PreprocessSuffix) "C:/Users/wittend/Projects/Radio/fdmdv2/fdmdv2basic/paclass.cpp" - - --include $(IntermediateDirectory)/*$(DependSuffix) -## -## Clean -## -clean: - $(RM) $(IntermediateDirectory)/gui$(ObjectSuffix) - $(RM) $(IntermediateDirectory)/gui$(DependSuffix) - $(RM) $(IntermediateDirectory)/gui$(PreprocessSuffix) - $(RM) $(IntermediateDirectory)/main$(ObjectSuffix) - $(RM) $(IntermediateDirectory)/main$(DependSuffix) - $(RM) $(IntermediateDirectory)/main$(PreprocessSuffix) - $(RM) $(IntermediateDirectory)/paclass$(ObjectSuffix) - $(RM) $(IntermediateDirectory)/paclass$(DependSuffix) - $(RM) $(IntermediateDirectory)/paclass$(PreprocessSuffix) - $(RM) $(OutputFile) - $(RM) $(OutputFile).exe - $(RM) "C:\Users\wittend\Projects\Radio\fdmdv2\.build-release\fdmdv2basic" - - diff --git a/fdmdv2/fdmdv2basic/fdmdv2basic.project b/fdmdv2/fdmdv2basic/fdmdv2basic.project deleted file mode 100644 index bce8cecc..00000000 --- a/fdmdv2/fdmdv2basic/fdmdv2basic.project +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - diff --git a/fdmdv2/fdmdv2basic/fdmdv2basic.txt b/fdmdv2/fdmdv2basic/fdmdv2basic.txt deleted file mode 100644 index 04bdf84a..00000000 --- a/fdmdv2/fdmdv2basic/fdmdv2basic.txt +++ /dev/null @@ -1 +0,0 @@ -./Release/gui.o ./Release/main.o ./Release/paclass.o diff --git a/fdmdv2/fdmdv2basic/gui.cpp b/fdmdv2/fdmdv2basic/gui.cpp deleted file mode 100644 index a6a6cf71..00000000 --- a/fdmdv2/fdmdv2basic/gui.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "gui.h" - -/////////////////////////////////////////////////////////////////////////// - -MainDialogBase::MainDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); - - wxBoxSizer* mainSizer; - mainSizer = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer2; - bSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbSizer1; - sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Settings") ), wxVERTICAL ); - - wxGridSizer* gSizer4; - gSizer4 = new wxGridSizer( 3, 1, 0, 0 ); - - wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Audio") ), wxVERTICAL ); - - wxGridSizer* gSizer1; - gSizer1 = new wxGridSizer( 4, 2, 0, 0 ); - - m_staticText1 = new wxStaticText( this, wxID_ANY, _("Rx In (radio):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - gSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboRxIn = new wxComboBox( this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer1->Add( m_comboRxIn, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - m_staticText2 = new wxStaticText( this, wxID_ANY, _("Rx Out (spkr):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText2->Wrap( -1 ); - gSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboRxOut = new wxComboBox( this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer1->Add( m_comboRxOut, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - m_staticText3 = new wxStaticText( this, wxID_ANY, _("Tx In (mic):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText3->Wrap( -1 ); - gSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboTxIn = new wxComboBox( this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer1->Add( m_comboTxIn, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - m_staticText4 = new wxStaticText( this, wxID_ANY, _("Tx Out (radio):"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText4->Wrap( -1 ); - gSizer1->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboTxOut = new wxComboBox( this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer1->Add( m_comboTxOut, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - - sbSizer3->Add( gSizer1, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxFIXED_MINSIZE, 2 ); - - - gSizer4->Add( sbSizer3, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxFIXED_MINSIZE, 5 ); - - wxStaticBoxSizer* sbSizer4; - sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("label") ), wxVERTICAL ); - - wxGridSizer* gSizer111; - gSizer111 = new wxGridSizer( 2, 2, 0, 0 ); - - m_staticText111 = new wxStaticText( this, wxID_ANY, _("Rate:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText111->Wrap( -1 ); - gSizer111->Add( m_staticText111, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboBox111 = new wxComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer111->Add( m_comboBox111, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - m_staticText211 = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText211->Wrap( -1 ); - gSizer111->Add( m_staticText211, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboBox211 = new wxComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer111->Add( m_comboBox211, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - - sbSizer4->Add( gSizer111, 0, wxALIGN_CENTER|wxEXPAND|wxFIXED_MINSIZE, 2 ); - - - gSizer4->Add( sbSizer4, 1, wxEXPAND|wxFIXED_MINSIZE, 5 ); - - wxStaticBoxSizer* sbSizer5; - sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Comm Port") ), wxVERTICAL ); - - wxGridSizer* gSizer11; - gSizer11 = new wxGridSizer( 2, 2, 0, 0 ); - - m_staticText11 = new wxStaticText( this, wxID_ANY, _("Radio:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - gSizer11->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboBox11 = new wxComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer11->Add( m_comboBox11, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - m_staticText21 = new wxStaticText( this, wxID_ANY, _("Port:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText21->Wrap( -1 ); - gSizer11->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - m_comboBox21 = new wxComboBox( this, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); - gSizer11->Add( m_comboBox21, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 2 ); - - - sbSizer5->Add( gSizer11, 0, wxALIGN_CENTER|wxEXPAND|wxFIXED_MINSIZE, 2 ); - - - gSizer4->Add( sbSizer5, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - - sbSizer1->Add( gSizer4, 1, wxEXPAND, 5 ); - - - bSizer2->Add( sbSizer1, 1, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer2; - sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Operation") ), wxVERTICAL ); - - m_toggleStartStop = new wxToggleButton( this, wxID_ANY, _("Start"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer2->Add( m_toggleStartStop, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); - - m_toggleRxTx = new wxToggleButton( this, wxID_ANY, _("Tx"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer2->Add( m_toggleRxTx, 2, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); - - - bSizer2->Add( sbSizer2, 0, wxEXPAND, 5 ); - - - mainSizer->Add( bSizer2, 1, wxEXPAND, 5 ); - - m_staticLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - mainSizer->Add( m_staticLine, 0, wxEXPAND | wxALL, 5 ); - - m_sdbSizer = new wxStdDialogButtonSizer(); - m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizer->AddButton( m_sdbSizerCancel ); - m_sdbSizer->Realize(); - - mainSizer->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxBOTTOM|wxRIGHT, 5 ); - - - this->SetSizer( mainSizer ); - this->Layout(); - - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogBase::OnCloseDialog ) ); - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( MainDialogBase::OnInitDialog ) ); - m_comboRxIn->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnRxInSelect ), NULL, this ); - m_comboRxOut->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnRxOutSelect ), NULL, this ); - m_comboTxIn->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnTxInSelect ), NULL, this ); - m_comboTxOut->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnTxOutSelect ), NULL, this ); - m_comboBox11->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnRadioSelect ), NULL, this ); - m_comboBox21->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnPortSelect ), NULL, this ); - m_toggleStartStop->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnToggleStartStop ), NULL, this ); - m_toggleRxTx->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnToggleRxRx ), NULL, this ); - m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCancelClick ), NULL, this ); -} - -MainDialogBase::~MainDialogBase() -{ - // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainDialogBase::OnCloseDialog ) ); - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( MainDialogBase::OnInitDialog ) ); - m_comboRxIn->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnRxInSelect ), NULL, this ); - m_comboRxOut->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnRxOutSelect ), NULL, this ); - m_comboTxIn->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnTxInSelect ), NULL, this ); - m_comboTxOut->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnTxOutSelect ), NULL, this ); - m_comboBox11->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnRadioSelect ), NULL, this ); - m_comboBox21->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainDialogBase::OnPortSelect ), NULL, this ); - m_toggleStartStop->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnToggleStartStop ), NULL, this ); - m_toggleRxTx->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnToggleRxRx ), NULL, this ); - m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainDialogBase::OnCancelClick ), NULL, this ); - -} diff --git a/fdmdv2/fdmdv2basic/gui.fbp b/fdmdv2/fdmdv2basic/gui.fbp deleted file mode 100644 index 47e80022..00000000 --- a/fdmdv2/fdmdv2basic/gui.fbp +++ /dev/null @@ -1,1977 +0,0 @@ - - - - - - C++|Python - 1 - source_name - 0 - 0 - res - UTF-8 - connect - gui - 1000 - none - 1 - gui - - . - - 1 - 1 - 1 - 0 - 0 - - 1 - 1 - 1 - 1 - - 0 - - - - - - - 1 - wxBOTH - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - -1,-1 - 1 - MainDialogBase - 1 - - - 1 - - Resizable - 1 - 523,526 - wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - FDMDV2Basic - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - OnCloseDialog - - - - - - OnInitDialog - - - - - - - - - - - - - - - - - - - - - - - mainSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer2 - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - wxID_ANY - Settings - - sbSizer1 - wxVERTICAL - none - - - 5 - wxEXPAND - 1 - - 1 - 0 - - gSizer4 - none - 3 - 0 - - 5 - wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxFIXED_MINSIZE - 1 - - wxID_ANY - Audio - - sbSizer3 - wxVERTICAL - none - - - 2 - wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxFIXED_MINSIZE - 0 - - 2 - 0 - - gSizer1 - none - 4 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rx In (radio): - - 0 - - - 0 - - 1 - m_staticText1 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboRxIn - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - <default> - - - - - OnRxInSelect - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rx Out (spkr): - - 0 - - - 0 - - 1 - m_staticText2 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboRxOut - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - <default> - - - - - OnRxOutSelect - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Tx In (mic): - - 0 - - - 0 - - 1 - m_staticText3 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboTxIn - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - <default> - - - - - OnTxInSelect - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Tx Out (radio): - - 0 - - - 0 - - 1 - m_staticText4 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboTxOut - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - <default> - - - - - OnTxOutSelect - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxFIXED_MINSIZE - 1 - - wxID_ANY - label - - sbSizer4 - wxVERTICAL - none - - - 2 - wxALIGN_CENTER|wxEXPAND|wxFIXED_MINSIZE - 0 - - 2 - 0 - - gSizer111 - none - 2 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rate: - - 0 - - - 0 - - 1 - m_staticText111 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboBox111 - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Combo! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - MyLabel - - 0 - - - 0 - - 1 - m_staticText211 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboBox211 - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Combo! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 1 - - wxID_ANY - Comm Port - - sbSizer5 - wxVERTICAL - none - - - 2 - wxALIGN_CENTER|wxEXPAND|wxFIXED_MINSIZE - 0 - - 2 - 0 - - gSizer11 - none - 2 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Radio: - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboBox11 - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Combo! - - - - - OnRadioSelect - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Port: - - 0 - - - 0 - - 1 - m_staticText21 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_comboBox21 - 1 - - - protected - 1 - - Resizable - -1 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - Combo! - - - - - OnPortSelect - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - wxID_ANY - Operation - - sbSizer2 - wxVERTICAL - none - - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Start - - 0 - - - 0 - - 1 - m_toggleStartStop - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - OnToggleStartStop - - - - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND - 2 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Tx - - 0 - - - 0 - - 1 - m_toggleRxTx - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - OnToggleRxRx - - - - - - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticLine - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT|wxBOTTOM|wxRIGHT - 0 - - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - - m_sdbSizer - protected - - OnCancelClick - - - - - - - - - - - - diff --git a/fdmdv2/fdmdv2basic/gui.fbp.bak b/fdmdv2/fdmdv2basic/gui.fbp.bak deleted file mode 100644 index fb922976..00000000 --- a/fdmdv2/fdmdv2basic/gui.fbp.bak +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - C++ - 1 - UTF-8 - connect - impl_virtual - gui - 1000 - none - 1 - gui - - . - - 1 - 0 - 0 - - - wxBOTH - - 1 - - - - 0 - wxID_ANY - - -1,-1 - MainDialogBase - - 400,300 - wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE - - wxMiniApp - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - OnCloseDialog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mainSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND | wxALL - 0 - - - - 1 - - - 0 - wxID_ANY - - - m_staticLine - protected - - - wxLI_HORIZONTAL - - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_RIGHT|wxBOTTOM|wxRIGHT - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizer - protected - - OnCancelClick - - - - OnOKClick - - - - - - - - diff --git a/fdmdv2/fdmdv2basic/gui.h b/fdmdv2/fdmdv2basic/gui.h deleted file mode 100644 index a32529e6..00000000 --- a/fdmdv2/fdmdv2basic/gui.h +++ /dev/null @@ -1,82 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 17 2012) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __GUI_H__ -#define __GUI_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -/// Class MainDialogBase -/////////////////////////////////////////////////////////////////////////////// -class MainDialogBase : public wxDialog -{ - private: - - protected: - wxStaticText* m_staticText1; - wxComboBox* m_comboRxIn; - wxStaticText* m_staticText2; - wxComboBox* m_comboRxOut; - wxStaticText* m_staticText3; - wxComboBox* m_comboTxIn; - wxStaticText* m_staticText4; - wxComboBox* m_comboTxOut; - wxStaticText* m_staticText111; - wxComboBox* m_comboBox111; - wxStaticText* m_staticText211; - wxComboBox* m_comboBox211; - wxStaticText* m_staticText11; - wxComboBox* m_comboBox11; - wxStaticText* m_staticText21; - wxComboBox* m_comboBox21; - wxToggleButton* m_toggleStartStop; - wxToggleButton* m_toggleRxTx; - wxStaticLine* m_staticLine; - wxStdDialogButtonSizer* m_sdbSizer; - wxButton* m_sdbSizerCancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); } - virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } - virtual void OnRxInSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRxOutSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void OnTxInSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void OnTxOutSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRadioSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void OnPortSelect( wxCommandEvent& event ) { event.Skip(); } - virtual void OnToggleStartStop( wxCommandEvent& event ) { event.Skip(); } - virtual void OnToggleRxRx( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - MainDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FDMDV2Basic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 523,526 ), long style = wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~MainDialogBase(); - -}; - -#endif //__GUI_H__ diff --git a/fdmdv2/fdmdv2basic/gui.py b/fdmdv2/fdmdv2basic/gui.py deleted file mode 100644 index e2052cbe..00000000 --- a/fdmdv2/fdmdv2basic/gui.py +++ /dev/null @@ -1,216 +0,0 @@ -# -*- coding: utf-8 -*- - -########################################################################### -## Python code generated with wxFormBuilder (version Mar 17 2012) -## http://www.wxformbuilder.org/ -## -## PLEASE DO "NOT" EDIT THIS FILE! -########################################################################### - -import wx -import wx.xrc - -import gettext -_ = gettext.gettext - -########################################################################### -## Class MainDialogBase -########################################################################### - -class MainDialogBase ( wx.Dialog ): - - def __init__( self, parent ): - wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"FDMDV2Basic"), pos = wx.DefaultPosition, size = wx.Size( 523,526 ), style = wx.CLOSE_BOX|wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER ) - - self.SetSizeHintsSz( wx.Size( -1,-1 ), wx.DefaultSize ) - - mainSizer = wx.BoxSizer( wx.VERTICAL ) - - bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) - - sbSizer1 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, _(u"Settings") ), wx.VERTICAL ) - - gSizer4 = wx.GridSizer( 3, 1, 0, 0 ) - - sbSizer3 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, _(u"Audio") ), wx.VERTICAL ) - - gSizer1 = wx.GridSizer( 4, 2, 0, 0 ) - - self.m_staticText1 = wx.StaticText( self, wx.ID_ANY, _(u"Rx In (radio):"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText1.Wrap( -1 ) - gSizer1.Add( self.m_staticText1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboRxInChoices = [] - self.m_comboRxIn = wx.ComboBox( self, wx.ID_ANY, _(u""), wx.DefaultPosition, wx.DefaultSize, m_comboRxInChoices, 0 ) - gSizer1.Add( self.m_comboRxIn, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, _(u"Rx Out (spkr):"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText2.Wrap( -1 ) - gSizer1.Add( self.m_staticText2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboRxOutChoices = [] - self.m_comboRxOut = wx.ComboBox( self, wx.ID_ANY, _(u""), wx.DefaultPosition, wx.DefaultSize, m_comboRxOutChoices, 0 ) - gSizer1.Add( self.m_comboRxOut, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, _(u"Tx In (mic):"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText3.Wrap( -1 ) - gSizer1.Add( self.m_staticText3, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboTxInChoices = [] - self.m_comboTxIn = wx.ComboBox( self, wx.ID_ANY, _(u""), wx.DefaultPosition, wx.DefaultSize, m_comboTxInChoices, 0 ) - gSizer1.Add( self.m_comboTxIn, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - self.m_staticText4 = wx.StaticText( self, wx.ID_ANY, _(u"Tx Out (radio):"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText4.Wrap( -1 ) - gSizer1.Add( self.m_staticText4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboTxOutChoices = [] - self.m_comboTxOut = wx.ComboBox( self, wx.ID_ANY, _(u""), wx.DefaultPosition, wx.DefaultSize, m_comboTxOutChoices, 0 ) - gSizer1.Add( self.m_comboTxOut, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - - sbSizer3.Add( gSizer1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND|wx.FIXED_MINSIZE, 2 ) - - - gSizer4.Add( sbSizer3, 1, wx.ALIGN_CENTER|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND|wx.FIXED_MINSIZE, 5 ) - - sbSizer4 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, _(u"label") ), wx.VERTICAL ) - - gSizer111 = wx.GridSizer( 2, 2, 0, 0 ) - - self.m_staticText111 = wx.StaticText( self, wx.ID_ANY, _(u"Rate:"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText111.Wrap( -1 ) - gSizer111.Add( self.m_staticText111, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboBox111Choices = [] - self.m_comboBox111 = wx.ComboBox( self, wx.ID_ANY, _(u"Combo!"), wx.DefaultPosition, wx.DefaultSize, m_comboBox111Choices, 0 ) - gSizer111.Add( self.m_comboBox111, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - self.m_staticText211 = wx.StaticText( self, wx.ID_ANY, _(u"MyLabel"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText211.Wrap( -1 ) - gSizer111.Add( self.m_staticText211, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboBox211Choices = [] - self.m_comboBox211 = wx.ComboBox( self, wx.ID_ANY, _(u"Combo!"), wx.DefaultPosition, wx.DefaultSize, m_comboBox211Choices, 0 ) - gSizer111.Add( self.m_comboBox211, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - - sbSizer4.Add( gSizer111, 0, wx.ALIGN_CENTER|wx.EXPAND|wx.FIXED_MINSIZE, 2 ) - - - gSizer4.Add( sbSizer4, 1, wx.EXPAND|wx.FIXED_MINSIZE, 5 ) - - sbSizer5 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, _(u"Comm Port") ), wx.VERTICAL ) - - gSizer11 = wx.GridSizer( 2, 2, 0, 0 ) - - self.m_staticText11 = wx.StaticText( self, wx.ID_ANY, _(u"Radio:"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText11.Wrap( -1 ) - gSizer11.Add( self.m_staticText11, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboBox11Choices = [] - self.m_comboBox11 = wx.ComboBox( self, wx.ID_ANY, _(u"Combo!"), wx.DefaultPosition, wx.DefaultSize, m_comboBox11Choices, 0 ) - gSizer11.Add( self.m_comboBox11, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - self.m_staticText21 = wx.StaticText( self, wx.ID_ANY, _(u"Port:"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText21.Wrap( -1 ) - gSizer11.Add( self.m_staticText21, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) - - m_comboBox21Choices = [] - self.m_comboBox21 = wx.ComboBox( self, wx.ID_ANY, _(u"Combo!"), wx.DefaultPosition, wx.DefaultSize, m_comboBox21Choices, 0 ) - gSizer11.Add( self.m_comboBox21, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND, 2 ) - - - sbSizer5.Add( gSizer11, 0, wx.ALIGN_CENTER|wx.EXPAND|wx.FIXED_MINSIZE, 2 ) - - - gSizer4.Add( sbSizer5, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 ) - - - sbSizer1.Add( gSizer4, 1, wx.EXPAND, 5 ) - - - bSizer2.Add( sbSizer1, 1, wx.EXPAND, 5 ) - - sbSizer2 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, _(u"Operation") ), wx.VERTICAL ) - - self.m_toggleStartStop = wx.ToggleButton( self, wx.ID_ANY, _(u"Start"), wx.DefaultPosition, wx.DefaultSize, 0 ) - sbSizer2.Add( self.m_toggleStartStop, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL|wx.EXPAND, 5 ) - - self.m_toggleRxTx = wx.ToggleButton( self, wx.ID_ANY, _(u"Tx"), wx.DefaultPosition, wx.DefaultSize, 0 ) - sbSizer2.Add( self.m_toggleRxTx, 2, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL|wx.EXPAND, 5 ) - - - bSizer2.Add( sbSizer2, 0, wx.EXPAND, 5 ) - - - mainSizer.Add( bSizer2, 1, wx.EXPAND, 5 ) - - self.m_staticLine = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - mainSizer.Add( self.m_staticLine, 0, wx.EXPAND |wx.ALL, 5 ) - - m_sdbSizer = wx.StdDialogButtonSizer() - self.m_sdbSizerCancel = wx.Button( self, wx.ID_CANCEL ) - m_sdbSizer.AddButton( self.m_sdbSizerCancel ) - m_sdbSizer.Realize(); - - mainSizer.Add( m_sdbSizer, 0, wx.ALIGN_RIGHT|wx.BOTTOM|wx.RIGHT, 5 ) - - - self.SetSizer( mainSizer ) - self.Layout() - - self.Centre( wx.BOTH ) - - # Connect Events - self.Bind( wx.EVT_CLOSE, self.OnCloseDialog ) - self.Bind( wx.EVT_INIT_DIALOG, self.OnInitDialog ) - self.m_comboRxIn.Bind( wx.EVT_COMBOBOX, self.OnRxInSelect ) - self.m_comboRxOut.Bind( wx.EVT_COMBOBOX, self.OnRxOutSelect ) - self.m_comboTxIn.Bind( wx.EVT_COMBOBOX, self.OnTxInSelect ) - self.m_comboTxOut.Bind( wx.EVT_COMBOBOX, self.OnTxOutSelect ) - self.m_comboBox11.Bind( wx.EVT_COMBOBOX, self.OnRadioSelect ) - self.m_comboBox21.Bind( wx.EVT_COMBOBOX, self.OnPortSelect ) - self.m_toggleStartStop.Bind( wx.EVT_TOGGLEBUTTON, self.OnToggleStartStop ) - self.m_toggleRxTx.Bind( wx.EVT_TOGGLEBUTTON, self.OnToggleRxRx ) - self.m_sdbSizerCancel.Bind( wx.EVT_BUTTON, self.OnCancelClick ) - - def __del__( self ): - pass - - - # Virtual event handlers, overide them in your derived class - def OnCloseDialog( self, event ): - event.Skip() - - def OnInitDialog( self, event ): - event.Skip() - - def OnRxInSelect( self, event ): - event.Skip() - - def OnRxOutSelect( self, event ): - event.Skip() - - def OnTxInSelect( self, event ): - event.Skip() - - def OnTxOutSelect( self, event ): - event.Skip() - - def OnRadioSelect( self, event ): - event.Skip() - - def OnPortSelect( self, event ): - event.Skip() - - def OnToggleStartStop( self, event ): - event.Skip() - - def OnToggleRxRx( self, event ): - event.Skip() - - def OnCancelClick( self, event ): - event.Skip() - - diff --git a/fdmdv2/fdmdv2basic/main.cpp b/fdmdv2/fdmdv2basic/main.cpp deleted file mode 100644 index a8578d29..00000000 --- a/fdmdv2/fdmdv2basic/main.cpp +++ /dev/null @@ -1,545 +0,0 @@ -/********************************************************************* - * Name: main.cpp - * Purpose: Implements simple wxWidgets application with GUI - * created using wxFormBuilder. - * Author: - * Created: - * Copyright: - * License: wxWidgets license (www.wxwidgets.org) - * - * Notes: Note that all GUI creation code is implemented in - * gui.cpp source file which is generated by wxFormBuilder. - *********************************************************************/ - -#include "main.h" - -// initialize the application -IMPLEMENT_APP(MainApp); - -//////////////////////////////////////////////////////////////////////////////// -// application class implementation -//////////////////////////////////////////////////////////////////////////////// - -bool MainApp::OnInit() -{ - SetTopWindow( new MainDialog( NULL ) ); - GetTopWindow()->Show(); - - // true = enter the main loop - return true; -} - -//////////////////////////////////////////////////////////////////////////////// -// main application frame implementation -//////////////////////////////////////////////////////////////////////////////// - -MainDialog::MainDialog(wxWindow *parent) : MainDialogBase( parent ) -{ - m_RxRunning = false; - m_TxRunning = false; - if(Pa_Initialize()) - { - wxMessageBox(wxT("Port Audio failed to initialize"), wxT("Pa_Initialize"), wxOK); - } -} - -MainDialog::~MainDialog() -{ -} - -void MainDialog::OnInitDialog( wxInitDialogEvent& event ) -{ - populateAudioInfo(); -} - -//------------------------------------------------------------------------- -// populateStandardSampleRates() -//------------------------------------------------------------------------- -void MainDialog::populateStandardSampleRates( - wxComboBox* target, - const portaudio::DirectionSpecificStreamParameters &inputParameters, - const portaudio::DirectionSpecificStreamParameters &outputParameters) -{ - static double STANDARD_SAMPLE_RATES[] = { - 8000.0, 9600.0, 11025.0, 12000.0, - 16000.0, 22050.0, 24000.0, 32000.0, - 44100.0, 48000.0, 88200.0, 96000.0, - -1 // negative terminated list - }; - int printCount = 0; - wxString tStr; - - for (int i = 0; STANDARD_SAMPLE_RATES[i] > 0; ++i) - { - portaudio::StreamParameters tmp = portaudio::StreamParameters(inputParameters, outputParameters, STANDARD_SAMPLE_RATES[i], 0, paNoFlag); - if (tmp.isSupported()) - { - tStr.Printf("%i %8.2f", printCount, STANDARD_SAMPLE_RATES[i]); - target->Append(tStr); - ++printCount; - } - } - if (printCount == 0) - { - tStr = "None\n"; - target->Append(tStr); - } -} - -//------------------------------------------------------------------------- -// OnActivate() -//------------------------------------------------------------------------- -int MainDialog::populateAudioInfo() -{ - wxString tStr; - wxString ttStr; - try - { - portaudio::AutoSystem autoSys; - portaudio::System &sys = portaudio::System::instance(); -/* - - tStr.Printf("PortAudio version number: %i\n", sys.version()); - m_textTopRight->AppendText(tStr); - - tStr.Printf("PortAudio version number: %s\n", sys.versionText()); - m_textTopRight->AppendText(tStr); - - int numDevices = sys.deviceCount(); - tStr.Printf("Number of devices: %i\n\n", numDevices); - m_textTopRight->AppendText(tStr); -*/ - for (portaudio::System::DeviceIterator i = sys.devicesBegin(); i != sys.devicesEnd(); ++i) - { -/* - tStr.Printf("---------- device #: %i ----------\n", (*i).index()); - m_textTopRight->AppendText(tStr); - bool defaultDisplayed = false; - if ((*i).isSystemDefaultInputDevice()) - { - tStr.Printf("[ System Default Input %s", (*i).hostApi().name()); - m_textTopRight->AppendText(tStr); - defaultDisplayed = true; - } - else if ((*i).isHostApiDefaultInputDevice()) - { - tStr.Printf("[ HostApi Default %s Input", (*i).hostApi().name()); - m_textTopRight->AppendText(tStr); - defaultDisplayed = true; - } - if ((*i).isSystemDefaultOutputDevice()) - { - tStr.Printf(defaultDisplayed ? "," : "["); - m_textTopRight->AppendText(tStr); - tStr = (" System Default Output"); - m_textTopRight->AppendText(tStr); - defaultDisplayed = true; - } - else if ((*i).isHostApiDefaultOutputDevice()) - { - tStr.Printf(defaultDisplayed ? "," : "["); - m_textTopRight->AppendText(tStr); - tStr.Printf(" HostApi Default %s Output", (*i).hostApi().name()); - m_textTopRight->AppendText(tStr); - defaultDisplayed = true; - } - if (defaultDisplayed) - { - tStr = " ]\n"; - m_textTopRight->AppendText(tStr); - } - ttStr.Printf("Name : %s\n", (*i).name()); - tStr += ttStr; - ttStr.Printf("Host API : %s\n", (*i).hostApi().name()); - tStr += ttStr; - ttStr.Printf("Max inputs : %i\n", (*i).maxInputChannels()); - tStr += ttStr; - ttStr.Printf("Max outputs : %i\n\n", (*i).maxOutputChannels()); - tStr += ttStr; - ttStr.Printf("Default low input latency : %8.3f\n", (*i).defaultLowInputLatency()); - tStr += ttStr; - ttStr.Printf("Default low output latency : %8.3f\n", (*i).defaultLowOutputLatency()); - tStr += ttStr; - ttStr.Printf("Default high input latency : %8.3f\n", (*i).defaultHighInputLatency()); - tStr += ttStr; - ttStr.Printf("Default high output latency : %8.3f\n\n", (*i).defaultHighOutputLatency()); - tStr += ttStr; - m_textTopRight->AppendText(tStr); - -#ifdef WIN32_ASIO - // ASIO specific latency information: - if ((*i).hostApi().typeId() == paASIO) - { - portaudio::AsioDeviceAdapter asioDevice((*i)); - //std::cout << "ASIO minimum buffer size = " << asioDevice.minBufferSize() << std::endl; - //std::cout << "ASIO maximum buffer size = " << asioDevice.maxBufferSize() << std::endl; - //std::cout << "ASIO preferred buffer size = " << asioDevice.preferredBufferSize() << std::endl; - if (asioDevice.granularity() == -1) - { - //std::cout << "ASIO buffer granularity = power of 2" << std::endl; - } - else - { - //std::cout << "ASIO buffer granularity = " << asioDevice.granularity() << std::endl; - } - } -#endif // WIN32_ASIO - - tStr.Printf("Default sample rate : %8.2f\n", (*i).defaultSampleRate()); - m_textTopRight->AppendText(tStr); - wxComboBox* m_comboAudioCodec; - wxComboBox* m_comboCodecTx; - wxComboBox* m_comboRadioRx; - wxComboBox* m_comboCodecSpkr; -*/ - // Poll for standard sample rates: - portaudio::DirectionSpecificStreamParameters inputParameters((*i), (*i).maxInputChannels(), portaudio::INT16, true, 0.0, NULL); - portaudio::DirectionSpecificStreamParameters outputParameters((*i), (*i).maxOutputChannels(), portaudio::INT16, true, 0.0, NULL); - if (inputParameters.numChannels() > 0) - { -// tStr = "Supported standard Input sample rates\n"; -// m_comboAudioCodec->Append(tStr); -// tStr.Printf(" for half-duplex 16 bit %i channel input = ", inputParameters.numChannels()); -// m_comboAudioCodec->InsertItems(1, &tStr, 0); -// m_comboAudioCodec->Append(tStr); - populateStandardSampleRates(m_comboRxIn, inputParameters, portaudio::DirectionSpecificStreamParameters::null()); - } - if (outputParameters.numChannels() > 0) - { -// tStr = "Supported standard Output sample rates\n"; -// m_comboRadioRx->Append(tStr); -// tStr.Printf(" for half-duplex 16 bit %i channel output = ", outputParameters.numChannels()); -// m_comboRadioRx->Append(tStr); - populateStandardSampleRates(m_comboRxOut, portaudio::DirectionSpecificStreamParameters::null(), outputParameters); - } - if (inputParameters.numChannels() > 0 && inputParameters.numChannels() > 0) - { -// tStr = "Supported full-duplex sample rates\n"; -// m_comboCodecTx->Append(tStr); -// tStr.Printf(" for full-duplex 16 bit %i channel input, %i", inputParameters.numChannels(), outputParameters.numChannels()); -// m_comboCodecTx->InsertItems(1, &tStr, 0); -// m_comboCodecTx->Append(tStr); - populateStandardSampleRates(m_comboTxIn, inputParameters, outputParameters); - } - if (outputParameters.numChannels() > 0 && outputParameters.numChannels() > 0) - { -// tStr = "Supported full-duplex sample rates\n"; -// m_comboCodecSpkr->Append(tStr); -// tStr.Printf(" for full-duplex 16 bit %i channel input, %i", inputParameters.numChannels(), outputParameters.numChannels()); -// m_comboCodecTx->InsertItems(1, &tStr, 0); - populateStandardSampleRates(m_comboTxOut, inputParameters, outputParameters); - } - } - } - catch (const portaudio::PaException &e) - { - tStr.Printf("A PortAudio error occured: %s\n", e.paErrorText()); - wxMessageBox(tStr, wxT("Portaudio exception"), wxOK); - } - catch (const portaudio::PaCppException &e) - { - tStr.Printf("A PortAudioCpp error occured: %s\n", e.what()); - wxMessageBox(tStr, wxT("PortAudioCpp error"), wxOK); - } - catch (const std::exception &e) - { - tStr.Printf("A generic exception occured: %s\n", e.what()); - wxMessageBox(tStr, wxT("Generic Exception"), wxOK); - } - catch (...) - { - tStr.Printf("An unknown exception occured.\n"); - wxMessageBox(tStr, wxT("Unknown error"), wxOK); - } - return 0; -} - -void MainDialog::OnToggleStartStop( wxCommandEvent& event ) -{ - if((!m_TxRunning) || (!m_RxRunning)) - { - startRxStream(); - startTxStream(); - } - else - { - stopRxStream(); - stopTxStream(); - } -} - -void MainDialog::OnToggleRxRx( wxCommandEvent& event ) -{ -} - -void MainDialog::OnRxInSelect(wxCommandEvent& event) -{ -} - -void MainDialog::OnRxOutSelect(wxCommandEvent& event) -{ -} - -void MainDialog::OnTxInSelect(wxCommandEvent& event) -{ -} - -void MainDialog::OnTxOutSelect(wxCommandEvent& event) -{ -} - -void MainDialog::OnRadioSelect(wxCommandEvent& event) -{ -} - -void MainDialog::OnPortSelect(wxCommandEvent& event) -{ -} - -void MainDialog::OnCloseDialog(wxCloseEvent& event) -{ - Pa_Terminate(); - Destroy(); -} - -void MainDialog::OnOKClick(wxCommandEvent& event) -{ - Pa_Terminate(); - Destroy(); -} - -void MainDialog::OnCancelClick(wxCommandEvent& event) -{ - Pa_Terminate(); - Destroy(); -} - -//------------------------------------------------------------------------- -// rxCallback() -//------------------------------------------------------------------------- -static int rxCallback( const void *inBuffer, - void *outBuffer, - unsigned long framesPerBuffer, - const PaStreamCallbackTimeInfo *outTime, - PaStreamCallbackFlags statusFlags, - void *userData - ) -{ - float *out = (float *) outBuffer; - float *in = (float *) inBuffer; - float leftIn; - float rightIn; - unsigned int i; - - if(inBuffer == NULL) - { - return 0; - } - // Read input buffer, process data, and fill output buffer. - for(i = 0; i < framesPerBuffer; i++) - { - leftIn = *in++; // Get interleaved samples from input buffer. - rightIn = *in++; - *out++ = leftIn * rightIn; // ring modulation - *out++ = 0.5f * (leftIn + rightIn); // mixing - } - return paContinue; // 0; -} - -//------------------------------------------------------------------------- -// txCallback() -//------------------------------------------------------------------------- -static int txCallback( const void *inBuffer, - void *outBuffer, - unsigned long framesPerBuffer, - const PaStreamCallbackTimeInfo *outTime, - PaStreamCallbackFlags statusFlags, - void *userData - ) -{ - float *out = (float *) outBuffer; - float *in = (float *) inBuffer; - float leftIn; - float rightIn; - unsigned int i; - - if(inBuffer == NULL) - { - return 0; - } - // Read input buffer, process data, and fill output buffer. - for(i = 0; i < framesPerBuffer; i++) - { - leftIn = *in++; // Get interleaved samples from input buffer. - rightIn = *in++; - *out++ = leftIn * rightIn; // ring modulation - *out++ = 0.5f * (leftIn + rightIn); // mixing - } - return paContinue; // 0; -} - -//------------------------------------------------------------------------- -// startRxStream() -//------------------------------------------------------------------------- -void MainDialog::startRxStream() -{ - if(!m_RxRunning) - { - m_RxRunning = true; - m_rxPa = new PortAudioWrap(); - - m_rxDevIn = m_rxPa->getDefaultInputDevice(); // default input device - if(m_rxDevIn == paNoDevice) - { - wxMessageBox(wxT("Rx Error: No default input device."), wxT("Error"), wxOK); - return; - } - m_rxErr = m_rxPa->setInputDevice(m_rxDevIn); - m_rxErr = m_rxPa->setInputChannelCount(2); // stereo input - m_rxErr = m_rxPa->setInputSampleFormat(PA_SAMPLE_TYPE); - m_rxErr = m_rxPa->setInputLatency(m_rxPa->getInputDefaultLowLatency()); - m_rxPa->setInputHostApiStreamInfo(NULL); - - m_rxDevOut = m_rxPa->getDefaultOutputDevice(); // default output device - if (m_rxDevOut == paNoDevice) - { - wxMessageBox(wxT("Rx Error: No default output device."), wxT("Error"), wxOK); - return; - } - m_rxErr = m_rxPa->setOutputDevice(m_rxDevOut); - m_rxErr = m_rxPa->setOutputChannelCount(2); // stereo input - m_rxErr = m_rxPa->setOutputSampleFormat(PA_SAMPLE_TYPE); - - m_rxErr = m_rxPa->setOutputLatency(m_rxPa->getOutputDefaultLowLatency()); - m_rxPa->setOutputHostApiStreamInfo(NULL); - - m_rxErr = m_rxPa->setFramesPerBuffer(FRAMES_PER_BUFFER); - m_rxErr = m_rxPa->setSampleRate(SAMPLE_RATE); - m_rxErr = m_rxPa->setStreamFlags(0); - m_rxErr = m_rxPa->setCallback(rxCallback); - m_rxErr = m_rxPa->streamOpen(); - - if(m_rxErr != paNoError) - { - wxMessageBox(wxT("Rx Stream Open/Setup error."), wxT("Error"), wxOK); - return; - } - m_rxErr = m_rxPa->streamStart(); - if(m_rxErr != paNoError) - { - wxMessageBox(wxT("Rx Stream Start Error."), wxT("Error"), wxOK); - return; - } - m_toggleStartStop->SetLabel(wxT("Stop")); - } -} - -//------------------------------------------------------------------------- -// stopRxStream() -//------------------------------------------------------------------------- -void MainDialog::stopRxStream() -{ - if(m_RxRunning) - { - m_RxRunning = false; - m_rxPa->stop(); - m_rxPa->streamClose(); - m_toggleStartStop->SetLabel(wxT("Start")); - } -} - -//------------------------------------------------------------------------- -// abortRxStream() -//------------------------------------------------------------------------- -void MainDialog::abortRxStream() -{ - if(m_RxRunning) - { - m_RxRunning = false; - m_rxPa->abort(); - m_toggleStartStop->SetLabel(wxT("Start")); - } -} - -//------------------------------------------------------------------------- -// startTxStream() -//------------------------------------------------------------------------- -void MainDialog::startTxStream() -{ - if(!m_TxRunning) - { - m_TxRunning = true; - m_txPa = new PortAudioWrap(); - - m_txDevIn = m_txPa->getDefaultInputDevice(); // default input device - if(m_txDevIn == paNoDevice) - { - wxMessageBox(wxT("Tx Error: No default input device."), wxT("Error"), wxOK); - return; - } - m_txErr = m_txPa->setInputDevice(m_txDevIn); - m_txErr = m_txPa->setInputChannelCount(2); // stereo input - m_txErr = m_txPa->setInputSampleFormat(PA_SAMPLE_TYPE); - m_txErr = m_txPa->setInputLatency(m_txPa->getInputDefaultLowLatency()); - m_txPa->setInputHostApiStreamInfo(NULL); - - m_txDevOut = m_txPa->getDefaultOutputDevice(); // default output device - if (m_txDevOut == paNoDevice) - { - wxMessageBox(wxT("Tx Error: No default output device."), wxT("Error"), wxOK); - return; - } - m_txErr = m_txPa->setOutputDevice(m_txDevOut); - m_txErr = m_txPa->setOutputChannelCount(2); // stereo input - m_txErr = m_txPa->setOutputSampleFormat(PA_SAMPLE_TYPE); - - m_txErr = m_txPa->setOutputLatency(m_txPa->getOutputDefaultLowLatency()); - m_txPa->setOutputHostApiStreamInfo(NULL); - - m_txErr = m_txPa->setFramesPerBuffer(FRAMES_PER_BUFFER); - m_txErr = m_txPa->setSampleRate(SAMPLE_RATE); - m_txErr = m_txPa->setStreamFlags(0); - m_txErr = m_txPa->setCallback(txCallback); - m_txErr = m_txPa->streamOpen(); - - if(m_txErr != paNoError) - { - wxMessageBox(wxT("Tx Stream Open/Setup error."), wxT("Error"), wxOK); - return; - } - m_txErr = m_txPa->streamStart(); - if(m_txErr != paNoError) - { - wxMessageBox(wxT("Tx Stream Start Error."), wxT("Error"), wxOK); - return; - } - m_toggleStartStop->SetLabel(wxT("Stop")); - } -} - -//------------------------------------------------------------------------- -// stopTxStream() -//------------------------------------------------------------------------- -void MainDialog::stopTxStream() -{ - if(m_TxRunning) - { - m_TxRunning = false; - m_txPa->stop(); - m_txPa->streamClose(); - m_toggleStartStop->SetLabel(wxT("Start")); - } -} - -//------------------------------------------------------------------------- -// abortTxStream() -//------------------------------------------------------------------------- -void MainDialog::abortTxStream() -{ - if(m_TxRunning) - { - m_TxRunning = false; - m_txPa->abort(); - m_toggleStartStop->SetLabel(wxT("Start")); - } -} diff --git a/fdmdv2/fdmdv2basic/main.h b/fdmdv2/fdmdv2basic/main.h deleted file mode 100644 index a8326ee1..00000000 --- a/fdmdv2/fdmdv2basic/main.h +++ /dev/null @@ -1,97 +0,0 @@ -/********************************************************************* - * Name: main.h - * Purpose: Declares simple wxWidgets application with GUI - * created using wxFormBuilder. - * Author: - * Created: - * Copyright: - * License: wxWidgets license (www.wxwidgets.org) - * - * Notes: Note that all GUI creation code is declared in - * gui.h source file which is generated by wxFormBuilder. - *********************************************************************/ - -#ifndef __main__ -#define __main__ - -// main wxWidgets header file -#include - -// Necessary Audio Stuff -#include "../libsndfile/include/sndfile.h" -#include "../extern/include/portaudio.h" -#include "../extern/include/portaudiocpp/PortAudioCpp.hxx" -#ifdef WIN32 -#include "../extern/include/portaudiocpp/AsioDeviceAdapter.hxx" -#endif -#include "paclass.h" - -// Fdmdv2 & Codec2 stuff -#include "C:\Users\wittend\Projects\Radio\codec2-dev\src\codec2.h" -#include "C:\Users\wittend\Projects\Radio\codec2-dev\src\fdmdv.h" - -// gui classes generated by wxFormBuilder -#include "gui.h" - -//////////////////////////////////////////////////////////////////////////////// -// application class declaration -//////////////////////////////////////////////////////////////////////////////// - -class MainApp : public wxApp -{ - public: - virtual bool OnInit(); -}; - -// declare global static function wxGetApp() -DECLARE_APP(MainApp) - -//////////////////////////////////////////////////////////////////////////////// -// main application frame declaration -//////////////////////////////////////////////////////////////////////////////// - -class MainDialog : public MainDialogBase -{ - public: - MainDialog( wxWindow *parent ); - virtual ~MainDialog(); - bool m_RxRunning; - bool m_TxRunning; - CODEC2 *m_RXCodec2; - CODEC2 *m_TXCodec2; - PortAudioWrap *m_rxPa; - PortAudioWrap *m_txPa; - PaDeviceIndex m_rxDevIn; - PaDeviceIndex m_rxDevOut; - PaDeviceIndex m_txDevIn; - PaDeviceIndex m_txDevOut; - PaError m_rxErr; - PaError m_txErr; - - protected: - // protected event handlers - void startTxStream(); - void startRxStream(); - void stopTxStream(); - void stopRxStream(); - void abortTxStream(); - void abortRxStream(); - void OnInitDialog( wxInitDialogEvent& event ); - void OnCloseDialog( wxCloseEvent& event ); - void OnOKClick( wxCommandEvent& event ); - void OnCancelClick( wxCommandEvent& event ); - void OnToggleStartStop( wxCommandEvent& event ); - void OnToggleRxRx( wxCommandEvent& event ); - void OnRxInSelect( wxCommandEvent& event ); - void OnRxOutSelect( wxCommandEvent& event ); - void OnTxInSelect( wxCommandEvent& event ); - void OnTxOutSelect( wxCommandEvent& event ); - void OnRadioSelect( wxCommandEvent& event ); - void OnPortSelect( wxCommandEvent& event ); - - void populateStandardSampleRates(wxComboBox* target, const portaudio::DirectionSpecificStreamParameters &inputParameters, const portaudio::DirectionSpecificStreamParameters &outputParameters); - int populateAudioInfo(); - -}; - -#endif //__main__ diff --git a/fdmdv2/fdmdv2basic/paclass.cpp b/fdmdv2/fdmdv2basic/paclass.cpp deleted file mode 100644 index 6e98b3b3..00000000 --- a/fdmdv2/fdmdv2basic/paclass.cpp +++ /dev/null @@ -1,211 +0,0 @@ -#include "paclass.h" - -PortAudioWrap::PortAudioWrap() -{ - stream = NULL; - userData = NULL; - samplerate = 0; - framesPerBuffer = 0; - statusFlags = 0; - streamCallback = NULL; - streamFinishedCallback = NULL; - timeInfo = 0; -} - -PortAudioWrap::~PortAudioWrap() -{ -} - -//PaError PortAudioWrap::init() -//{ -// return Pa_Initialize(); -//} - -PaError PortAudioWrap::streamOpen() -{ - return Pa_OpenStream( - &stream, - &inputBuffer, - &outputBuffer, - samplerate, - framesPerBuffer, - statusFlags, - *streamCallback, - userData - ); -} - -PaError PortAudioWrap::streamStart() -{ - return Pa_StartStream(stream); -} - -PaError PortAudioWrap::streamClose() -{ - if(isOpen()) - { - PaError rv = Pa_CloseStream(stream); - return rv; - } - else - { - return paNoError; - } -} - -void PortAudioWrap::terminate() -{ - if(Pa_IsStreamStopped(stream) != paNoError) - { - Pa_StopStream(stream); - } - Pa_Terminate(); -} - -void PortAudioWrap::stop() -{ - Pa_StopStream(stream); -} - -void PortAudioWrap::abort() -{ - Pa_AbortStream(stream); -} - -bool PortAudioWrap::isStopped() const -{ - PaError ret = Pa_IsStreamStopped(stream); - return ret; -} - -bool PortAudioWrap::isActive() const -{ - PaError ret = Pa_IsStreamActive(stream); - return ret; -} - -bool PortAudioWrap::isOpen() const -{ - return (stream != NULL); -} - -PaDeviceIndex PortAudioWrap::getDefaultInputDevice() -{ - return Pa_GetDefaultInputDevice(); -} - -PaDeviceIndex PortAudioWrap::getDefaultOutputDevice() -{ - return Pa_GetDefaultOutputDevice(); -} - -PaError PortAudioWrap::setInputChannelCount(int count) -{ - inputBuffer.channelCount = count; - return paNoError; -} - -PaError PortAudioWrap::getInputChannelCount() -{ - return inputBuffer.channelCount; -} - -PaError PortAudioWrap::setInputSampleFormat(PaSampleFormat format) -{ - inputBuffer.sampleFormat = format; - return paNoError; -} - -PaError PortAudioWrap::setInputLatency(PaTime latency) -{ - inputBuffer.suggestedLatency = latency; - return paNoError; -} - -void PortAudioWrap::setInputHostApiStreamInfo(void *info) -{ - inputBuffer.hostApiSpecificStreamInfo = info; -} - -PaTime PortAudioWrap::getInputDefaultLowLatency() -{ - return Pa_GetDeviceInfo(inputBuffer.device)->defaultLowInputLatency; -} - -PaError PortAudioWrap::setOutputChannelCount(int count) -{ - outputBuffer.channelCount = count; - return paNoError; -} - -int PortAudioWrap::getOutputChannelCount() -{ - return outputBuffer.channelCount; -} - -const char *PortAudioWrap::getDeviceName(PaDeviceIndex dev) -{ - const PaDeviceInfo *info; - info = Pa_GetDeviceInfo(dev); - return info->name; -} - -PaError PortAudioWrap::setOutputSampleFormat(PaSampleFormat format) -{ - outputBuffer.sampleFormat = format; - return paNoError; -} - -PaError PortAudioWrap::setOutputLatency(PaTime latency) -{ - outputBuffer.suggestedLatency = latency; - return paNoError; -} - -void PortAudioWrap::setOutputHostApiStreamInfo(void *info) -{ - outputBuffer.hostApiSpecificStreamInfo = info; -} - -PaTime PortAudioWrap::getOutputDefaultLowLatency() -{ - return Pa_GetDeviceInfo(outputBuffer.device)->defaultLowOutputLatency; -} - -PaError PortAudioWrap::setFramesPerBuffer(unsigned long size) -{ - framesPerBuffer = size; - return paNoError; -} - -PaError PortAudioWrap::setSampleRate(unsigned long rate) -{ - samplerate = rate; - return paNoError; -} - -PaError PortAudioWrap::setStreamFlags(PaStreamFlags flags) -{ - statusFlags = flags; - return paNoError; -} - -PaError PortAudioWrap::setInputDevice(PaDeviceIndex index) -{ -// inputDevice = index; - inputBuffer.device = index; - return paNoError; -} - -PaError PortAudioWrap::setOutputDevice(PaDeviceIndex index) -{ -// outputDevice = index; - outputBuffer.device = index; - return paNoError; -} - -PaError PortAudioWrap::setCallback(PaStreamCallback *callback) -{ - streamCallback = callback; - return paNoError; -} diff --git a/fdmdv2/fdmdv2basic/paclass.h b/fdmdv2/fdmdv2basic/paclass.h deleted file mode 100644 index a20b272f..00000000 --- a/fdmdv2/fdmdv2basic/paclass.h +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include "portaudio.h" - -// Note that many of the older ISA sound cards on PCs do NOT support -// full duplex audio (simultaneous record and playback). -// And some only support full duplex at lower sample rates. -#define SAMPLE_RATE (44100) -#define PA_SAMPLE_TYPE paFloat32 //paInt16 -#define FRAMES_PER_BUFFER (64) - -typedef float SAMPLE; - -float CubicAmplifier(float input); - -class PortAudioWrap -{ - public: - PortAudioWrap(); - ~PortAudioWrap(); - - private: - PaStream *stream; - PaStreamParameters inputBuffer; - PaStreamParameters outputBuffer; - void *userData; - int samplerate; - unsigned long framesPerBuffer; - PaStreamCallbackFlags statusFlags; - PaStreamCallback *streamCallback; - PaStreamFinishedCallback *streamFinishedCallback; - const PaStreamCallbackTimeInfo *timeInfo; - - public: - - PaError streamOpen(); - - PaDeviceIndex getDefaultInputDevice(); - PaDeviceIndex getDefaultOutputDevice(); - - PaStreamParameters *getDeviceInfo(PaDeviceIndex idx); - PaError setFramesPerBuffer(unsigned long size); - PaError setSampleRate(unsigned long size); - PaError setStreamFlags(PaStreamFlags flags); - PaError setCallback(PaStreamCallback *streamCallback); - PaError setStreamCallback(PaStream *stream, PaStreamCallback* callback ) { streamCallback = callback; return 0;} - PaError setStreamFinishedCallback(PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback ); - - PaError setInputDevice(PaDeviceIndex dev); - PaError setInputChannelCount(int count); - int getInputChannelCount(); - PaError setInputSampleFormat(PaSampleFormat format); - PaError setInputSampleRate(PaSampleFormat format); - PaError setInputLatency(PaTime latency); - void setInputHostApiStreamInfo(void *info = NULL); - PaTime getInputDefaultLowLatency(); - const char *getDeviceName(PaDeviceIndex dev); - - PaError setOutputDevice(PaDeviceIndex dev); - PaError setOutputChannelCount(int count); - int getOutputChannelCount(); - PaError setOutputSampleFormat(PaSampleFormat format); - PaError setOutputLatency(PaTime latency); - void setOutputHostApiStreamInfo(void *info = NULL); - PaTime getOutputDefaultLowLatency(); - -// PaError init(); - PaError streamStart(); - PaError streamClose(); - void terminate(); - bool isOpen() const; - void stop(); - void abort(); - bool isStopped() const; - bool isActive() const; -};