mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-08 17:04:41 -04:00
1. Fix a longstanding (and evidently latent) bug in widegraph.cpp.
2. Add basic proof-of-concept code that uses QAudioInput instead of PortAudio for sound input. By default, this test code is not active, and it compiles using PortAudio. To compile using QAudio, uncomment the line #DEFINES += QAUDIO_INPUT in wsjtx.pro. Note that device selection in the QAudio code is presently hard-wired to use the default input device. You can change this choice on line 267 in soundin.cpp. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3510 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+5
-2
@@ -2,6 +2,8 @@
|
||||
#include "ui_widegraph.h"
|
||||
#include "commons.h"
|
||||
|
||||
#define MAX_SCREENSIZE 2048
|
||||
|
||||
WideGraph::WideGraph(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::WideGraph)
|
||||
@@ -10,7 +12,7 @@ WideGraph::WideGraph(QWidget *parent) :
|
||||
this->setWindowFlags(Qt::Dialog);
|
||||
this->installEventFilter(parent); //Installing the filter
|
||||
ui->widePlot->setCursor(Qt::CrossCursor);
|
||||
this->setMaximumWidth(2048);
|
||||
this->setMaximumWidth(MAX_SCREENSIZE);
|
||||
this->setMaximumHeight(880);
|
||||
ui->widePlot->setMaximumHeight(800);
|
||||
ui->widePlot->m_bCurrent=false;
|
||||
@@ -85,7 +87,7 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym,
|
||||
int ndiskdata)
|
||||
{
|
||||
static float splot[NSMAX];
|
||||
static float swide[2048];
|
||||
static float swide[MAX_SCREENSIZE];
|
||||
int nbpp = ui->widePlot->binsPerPixel();
|
||||
static int n=0;
|
||||
|
||||
@@ -105,6 +107,7 @@ void WideGraph::dataSink2(float s[], float df3, int ihsym,
|
||||
n=0;
|
||||
int i=int(ui->widePlot->startFreq()/df3 + 0.5);
|
||||
int jz=5000.0/(nbpp*df3);
|
||||
if(jz>MAX_SCREENSIZE) jz=MAX_SCREENSIZE;
|
||||
for (int j=0; j<jz; j++) {
|
||||
float sum=0;
|
||||
for (int k=0; k<nbpp; k++) {
|
||||
|
||||
Reference in New Issue
Block a user