From e2e3e98e0625e7b55d2229f6a0779ee5232ee18d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 3 Oct 2012 15:42:13 +0000 Subject: [PATCH] More cleanup; correct the value of NSMAX in GUI. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2639 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- commons.h | 6 ++--- getfile.cpp | 12 +++++----- lib/jt9.f90 | 15 ++---------- lib/ms3.f90 | 37 ----------------------------- lib/msk.f90 | 63 ------------------------------------------------- lib/msk0.f90 | 49 -------------------------------------- lib/symspec.f90 | 2 +- mainwindow.cpp | 8 +++---- plotter.cpp | 6 ++--- soundin.cpp | 10 ++++---- widegraph.cpp | 2 +- 11 files changed, 25 insertions(+), 185 deletions(-) delete mode 100644 lib/ms3.f90 delete mode 100644 lib/msk.f90 delete mode 100644 lib/msk0.f90 diff --git a/commons.h b/commons.h index 634625453..3ce33b035 100644 --- a/commons.h +++ b/commons.h @@ -1,12 +1,12 @@ #ifndef COMMONS_H #define COMMONS_H -#define NSMAX 10000 +#define NSMAX 22000 extern "C" { extern struct { - short int d2[1800*12000]; //This is "common/jt8com/..." in fortran + short int d2[1800*12000]; //This is "common/jt9com/..." in fortran float ss[184*NSMAX]; float savg[NSMAX]; double fcenter; //USB dial freq (kHz) @@ -27,7 +27,7 @@ extern struct { int kin; int kline; char datetime[20]; -} jt8com_; +} jt9com_; } diff --git a/getfile.cpp b/getfile.cpp index a6cfc924e..ae2e528b6 100644 --- a/getfile.cpp +++ b/getfile.cpp @@ -12,14 +12,14 @@ void getfile(QString fname, int ntrperiod) FILE* fp=fopen(name,"rb"); int npts=ntrperiod*12000; - memset(jt8com_.d2,0,2*npts); + memset(jt9com_.d2,0,2*npts); if(fp != NULL) { // Read (and ignore) a 44-byte WAV header; then read data - fread(jt8com_.d2,1,44,fp); - int nrd=fread(jt8com_.d2,2,npts,fp); + fread(jt9com_.d2,1,44,fp); + int nrd=fread(jt9com_.d2,2,npts,fp); fclose(fp); -// for(int i=0; i #define FRAMES_PER_BUFFER 1024 -#define NSMAX 10000 +#define NSMAX 22000 extern "C" { #include extern struct { - short int d2[1800*12000]; //This is "common/jt8com/..." in fortran + short int d2[1800*12000]; //This is "common/jt9com/..." in fortran float ss[184*NSMAX]; float savg[NSMAX]; double fcenter; //USB dial freq (kHz) @@ -28,7 +28,7 @@ extern struct { int kin; int kline; char datetime[20]; -} jt8com_; +} jt9com_; } typedef struct @@ -67,9 +67,9 @@ extern "C" int a2dCallback( const void *inputBuffer, void *outputBuffer, nbytes=2*framesToProcess; //Bytes per frame k=udata->kin; - memcpy(&jt8com_.d2[k],inputBuffer,nbytes); //Copy all samples to d2 + memcpy(&jt9com_.d2[k],inputBuffer,nbytes); //Copy all samples to d2 udata->kin += framesToProcess; - jt8com_.kin=udata->kin; + jt9com_.kin=udata->kin; return paContinue; } diff --git a/widegraph.cpp b/widegraph.cpp index d74af58ac..c0f703c13 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -1,7 +1,7 @@ #include "widegraph.h" #include "ui_widegraph.h" -#define NSMAX 10000 +#define NSMAX 22000 WideGraph::WideGraph(QWidget *parent) : QDialog(parent),