// WxWidgets - initialize the application
IMPLEMENT_APP(MainApp);
-FILE *ftest;
+//FILE *ftest;
FILE *g_logfile;
//-------------------------------------------------------------------------
m_plugIn = false;
#ifdef __WXMSW__
- wchar_t dll_path[] = L"/home/david/tmp/modem_api/afreedvplugin.dll";
+ wchar_t dll_path[] = L"afreedvplugin.dll";
m_plugInHandle = LoadLibrary(dll_path);
#else
- m_plugInHandle = dlopen("/home/david/tmp/modem_api/afreedvplugin.so", RTLD_LAZY);
+ m_plugInHandle = dlopen("afreedvplugin.so", RTLD_LAZY);
#endif
if (m_plugInHandle) {
vk_state = VK_IDLE;
- ftest = fopen("ftest.raw", "wb");
- assert(ftest != NULL);
+ //ftest = fopen("ftest.raw", "wb");
+ //assert(ftest != NULL);
}
//-------------------------------------------------------------------------
int w;
int h;
- fclose(ftest);
+ //fclose(ftest);
#ifdef __WXMSW__
fclose(g_logfile);
#endif
assert(nin <= freedv_get_n_max_modem_samples(g_pfreedv));
nin_prev = nin;
- fwrite(input_buf, sizeof(short), nin, ftest);
+ //fwrite(input_buf, sizeof(short), nin, ftest);
// demod per frame processing
for(i=0; i<nin; i++) {
tools->Append(m_menuItemFilter);
wxMenuItem* m_menuItemPlugIn;
- m_menuItemPlugIn = new wxMenuItem(tools, wxID_ANY, plugInName + wxString(_(" Config")) , wxEmptyString, wxITEM_NORMAL);
- tools->Append(m_menuItemPlugIn);
+ if (!wxIsEmpty(plugInName)) {
+ m_menuItemPlugIn = new wxMenuItem(tools, wxID_ANY, plugInName + wxString(_(" Config")) , wxEmptyString, wxITEM_NORMAL);
+ tools->Append(m_menuItemPlugIn);
+ }
wxMenuItem* m_menuItemPlayFileToMicIn;
m_menuItemPlayFileToMicIn = new wxMenuItem(tools, wxID_ANY, wxString(_("Start/Stop Play File - Mic In")) , wxEmptyString, wxITEM_NORMAL);
sbSizer_mode->Add(m_rb1600, 0, wxALIGN_LEFT|wxALL, 1);
m_rb1600->SetValue(true);
- // Optional plug in
+ if (!wxIsEmpty(plugInName)) {
+ // Optional plug in
- m_rbPlugIn = new wxRadioButton( this, wxID_ANY, plugInName, wxDefaultPosition, wxDefaultSize, 0);
- sbSizer_mode->Add(m_rbPlugIn, 0, wxALIGN_LEFT|wxALL, 1);
+ m_rbPlugIn = new wxRadioButton( this, wxID_ANY, plugInName, wxDefaultPosition, wxDefaultSize, 0);
+ sbSizer_mode->Add(m_rbPlugIn, 0, wxALIGN_LEFT|wxALL, 1);
+ }
#ifdef DISABLED_FEATURE
m_rb1600Wide = new wxRadioButton( this, wxID_ANY, wxT("1600 Wide"), wxDefaultPosition, wxDefaultSize, 0);
this->Connect(m_menuItemOptions->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsOptions));
this->Connect(m_menuItemOptions->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsOptionsUI));
- this->Connect(m_menuItemPlugIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsPlugInCfg));
- this->Connect(m_menuItemPlugIn->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsPlugInCfgUI));
+ if (!wxIsEmpty(plugInName)) {
+ this->Connect(m_menuItemPlugIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsPlugInCfg));
+ this->Connect(m_menuItemPlugIn->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsPlugInCfgUI));
+ }
this->Connect(m_menuItemPlayFileToMicIn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnPlayFileToMicIn));
this->Connect(m_menuItemRecFileFromRadio->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnRecFileFromRadio));