From 313afc1481860cdd0f2b4fdcc49148e9a9087a7a Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 18 Nov 2012 14:02:50 +0000 Subject: [PATCH] Working on the occasional crashes (threading bug?) and on larger DT for use on the EME path. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2747 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- getfile.cpp | 1 + mainwindow.cpp | 11 ++++++----- wsjtx.pro | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/getfile.cpp b/getfile.cpp index 6688c7285..2407c4424 100644 --- a/getfile.cpp +++ b/getfile.cpp @@ -25,6 +25,7 @@ void getfile(QString fname, int ntrperiod) if(fp != NULL) { // Read (and ignore) a 44-byte WAV header; then read data fread(jt9com_.d2,1,44,fp); +// fread(jt9com_.d2,2,30000,fp); fread(jt9com_.d2,2,npts,fp); fclose(fp); jt9com_.newdat=1; diff --git a/mainwindow.cpp b/mainwindow.cpp index 1cc63180a..70e24caf3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -874,6 +874,7 @@ void MainWindow::guiUpdate() static bool btxok0=false; static int nc0=1; static int nc1=1; + static char message[29]; static char msgsent[29]; static int nsendingsh=0; int khsym=0; @@ -922,7 +923,6 @@ void MainWindow::guiUpdate() // Calculate Tx waveform when needed if((iptt==1 && iptt0==0) || m_restart) { - char message[29]; QByteArray ba; if(m_ntx == 1) ba=ui->tx1->text().toLocal8Bit(); if(m_ntx == 2) ba=ui->tx2->text().toLocal8Bit(); @@ -1033,11 +1033,14 @@ void MainWindow::guiUpdate() } m_hsym0=khsym; m_sec0=nsec; + if(m_myCall=="K1JT") { char s[20]; - double t1=soundInThread.samFacIn(); + double t1=1.0; +//Better: use signals from sound threads? +// if(soundInThread.isRunning()) t1=soundInThread.samFacIn(); double t2=1.0; - if(soundOutThread.isRunning()) t2=soundOutThread.samFacOut(); +// if(soundOutThread.isRunning()) t2=soundOutThread.samFacOut(); sprintf(s,"%6.4f %6.4f",t1,t2); lab5->setText(s); } @@ -1051,10 +1054,8 @@ void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg() bool eom; eom=false; int iz=ba.length(); -// qDebug() << ba << iz; for(int i=0;i