Put in some (temporary?) "#ifdef WIN32" statements, so that it will

compile under Linux.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2741 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-11-16 15:57:42 +00:00
parent 566672e9a3
commit 09f26b6fff
2 changed files with 12 additions and 1 deletions

View File

@ -31,6 +31,8 @@ void DevSetup::initDlg()
char pa_device_hostapi[128];
k=0;
#ifdef WIN32
// Needs work to compile for Linux
for(id=0; id<numDevices; id++ ) {
pdi=Pa_GetDeviceInfo(id);
nchin=pdi->maxInputChannels;
@ -58,6 +60,7 @@ void DevSetup::initDlg()
ui.comboBoxSndIn->addItem(t);
}
}
#endif
k=0;
for(id=0; id<numDevices; id++ ) {
@ -70,8 +73,11 @@ void DevSetup::initDlg()
sprintf((char*)(pa_device_hostapi),"%s",
Pa_GetHostApiInfo(pdi->hostApi)->name);
#ifdef WIN32
// Needs work to compile for Linux
p1=(char*)"";
p=strstr(pa_device_hostapi,"MME");
if(p!=NULL) p1=(char*)"MME";
p=strstr(pa_device_hostapi,"Direct");
if(p!=NULL) p1=(char*)"DirectX";
@ -81,10 +87,10 @@ void DevSetup::initDlg()
if(p!=NULL) p1=(char*)"ASIO";
p=strstr(pa_device_hostapi,"WDM-KS");
if(p!=NULL) p1=(char*)"WDM-KS";
sprintf(p2,"%2d %d %-8s %-39s",id,nchout,p1,pa_device_name);
QString t(p2);
ui.comboBoxSndOut->addItem(t);
#endif
}
}

View File

@ -3,7 +3,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifdef WIN32
#include <windows.h>
#endif
void getfile(QString fname, int ntrperiod)
{
@ -119,6 +122,7 @@ float gran()
int ptt(int nport, int ntx, int *iptt)
{
#ifdef WIN32
static HANDLE hFile;
static int open=0;
char s[10];
@ -161,4 +165,5 @@ int ptt(int nport, int ntx, int *iptt)
if(i9==0) return -(CLRBREAK);
if(i00==0) return -10;
return 0;
#endif
}