From: drowe67 Date: Mon, 12 Nov 2012 21:43:36 +0000 (+0000) Subject: Testing wxlogdebug and added device number to device name in config dialog to help... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=abae3fbbcea4b08642ebb4e9591f84225ab8892b;p=freetel-svn-tracking.git Testing wxlogdebug and added device number to device name in config dialog to help ID devices with the same name under Windows git-svn-id: https://svn.code.sf.net/p/freetel/code@964 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/README.Win32 b/fdmdv2/README.Win32 index dc18ce55..c546c2cd 100644 --- a/fdmdv2/README.Win32 +++ b/fdmdv2/README.Win32 @@ -1,6 +1,13 @@ README.Win32 David Rowe 27 Oct 2012 +Debugging Under Windows +----------------------- + +printfs don't appear until after the program finishes. wxLogDebug() +works but you need to run DbgView available from +http://www.sysinternals.com to capture the messages. + Notes on building fdmdv2 for Windows ------------------------------------ diff --git a/fdmdv2/src/Makefile.win32 b/fdmdv2/src/Makefile.win32 index 7cb3e668..33fe92cd 100644 --- a/fdmdv2/src/Makefile.win32 +++ b/fdmdv2/src/Makefile.win32 @@ -9,7 +9,7 @@ CODEC2_PATH=$(HOME)/codec2-dev INCLUDE_PATH=/usr/local/include WX_CONFIG=wx-config -WX_CPPFLAGS = $(shell $(WX_CONFIG) --cxxflags) +WX_CPPFLAGS = $(shell $(WX_CONFIG) --cxxflags) -D__WXDEBUG__ WX_LIBS = $(shell $(WX_CONFIG) --libs core, base, aui, adv) CODEC2_INC=$(CODEC2_PATH)/src CODEC2_LIB=$(CODEC2_PATH)/src/.libs/libcodec2.a diff --git a/fdmdv2/src/dlg_audiooptions.cpp b/fdmdv2/src/dlg_audiooptions.cpp index 7363e2b7..cd3d4add 100644 --- a/fdmdv2/src/dlg_audiooptions.cpp +++ b/fdmdv2/src/dlg_audiooptions.cpp @@ -311,7 +311,7 @@ int AudioOptsDialog::setTextCtrlIfDevNumValid(wxTextCtrl *textCtrl, wxListCtrl * printf("aDevNum: %d devNum: %d\n", aDevNum, devNum); if (aDevNum == devNum) { found_devNum = 1; - textCtrl->SetValue(listCtrl->GetItemText(i, 0)); + textCtrl->SetValue(listCtrl->GetItemText(i, 0) + " (" + wxString::Format(wxT("%i"),devNum) + ")"); } } @@ -752,11 +752,14 @@ void AudioOptsDialog::OnDeviceSelect(wxComboBox *cbSampleRate, { wxString devName = listCtrlDevices->GetItemText(index, 0); - textCtrl->SetValue(devName); - if (devName.IsSameAs("none")) + if (devName.IsSameAs("none")) { *devNum = -1; + textCtrl->SetValue("none"); + } else { *devNum = wxAtoi(listCtrlDevices->GetItemText(index, 1)); + textCtrl->SetValue(devName + " (" + wxString::Format(wxT("%i"),*devNum) + ")"); + int numSampleRates = buildListOfSupportedSampleRates(cbSampleRate, *devNum, in_out); if (numSampleRates) { wxString defSampleRate = listCtrlDevices->GetItemText(index, 3); diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 220c92b7..08d17db4 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -157,6 +157,10 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) int y = pConfig->Read(wxT("/MainFrame/left"), 50); int w = pConfig->Read(wxT("/MainFrame/width"), 650); int h = pConfig->Read(wxT("/MainFrame/height"), 400); + + // note: run DbgView program to see this message under windows + wxLogDebug("x = %d y = %d w = %d h = %d\n", x,y,w,h); + 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);