diff --git a/lib/Makefile.MinGW b/lib/Makefile.MinGW index 0db7ac4c5..a8d028daa 100644 --- a/lib/Makefile.MinGW +++ b/lib/Makefile.MinGW @@ -50,7 +50,8 @@ OBJS1 = pctile.o graycode.o sort.o ssort.o \ filbig.o fil6521.o afc65b.o decode65b.o setup65.o \ extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \ move.o indexx.o graycode65.o twkfreq65.o smo121.o \ - wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o + wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \ + flat3.o polfit.o determ.o libjt9.a: $(OBJS1) ar cr libjt9.a $(OBJS1) diff --git a/lib/Makefile.linux b/lib/Makefile.linux index 697f6324d..884387a44 100644 --- a/lib/Makefile.linux +++ b/lib/Makefile.linux @@ -40,7 +40,8 @@ OBJS1 = pctile.o graycode.o sort.o ssort.o \ filbig.o fil6521.o afc65b.o decode65b.o setup65.o \ extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \ move.o indexx.o graycode65.o twkfreq65.o smo121.o \ - wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o + wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \ + flat3.o polfit.o determ.o libjt9.a: $(OBJS1) ar cr libjt9.a $(OBJS1) diff --git a/lib/flat3.f90 b/lib/flat3.f90 index 75562268d..5ca2ae9ee 100644 --- a/lib/flat3.f90 +++ b/lib/flat3.f90 @@ -67,7 +67,7 @@ subroutine flat3(s0,iz,nfa,nfb,nterms,ynoise,s) ! enddo do i=1,ib - y4=y0(i)-yfit(i) - 20.0 + y4=y0(i)-yfit(i) - 10.0 s(i)=10.0**(0.1*y4) enddo diff --git a/lib/symspec.f90 b/lib/symspec.f90 index bcd240aba..3a85f2a10 100644 --- a/lib/symspec.f90 +++ b/lib/symspec.f90 @@ -41,7 +41,7 @@ subroutine symspec(k,ntrperiod,nsps,ingain,slope,pxdb,s,df3,ihsym,npts8) go to 900 !Wait for enough samples to start endif - if(nfft3.ne.nfft3z .or. (slope.ne.slope0 .and. abs(slope+0.1).gt.0.05)) then + if(nfft3.ne.nfft3z .or. slope.ne.slope0) then ! Compute new window and adjust scale factor pi=4.0*atan(1.0) do i=1,nfft3 @@ -49,10 +49,14 @@ subroutine symspec(k,ntrperiod,nsps,ingain,slope,pxdb,s,df3,ihsym,npts8) enddo nfft3z=nfft3 nh=NSMAX/2 - do i=1,NSMAX - x=slope*float(i)/nh - 1.0 + 2.6 - scale(i)=10.0**x - enddo + if(abs(slope+0.1).gt.0.05) then + do i=1,NSMAX + x=slope*float(i)/nh - 1.0 + 2.6 + scale(i)=10.0**x + enddo + else + scale=1.0 + endif slope0=slope endif @@ -110,7 +114,8 @@ subroutine symspec(k,ntrperiod,nsps,ingain,slope,pxdb,s,df3,ihsym,npts8) if(abs(slope+0.1).lt.0.01) then call flat3(s,iz,nfa,nfb,3,1.0,s) -! call flat3(savg,iz,3,1.0,savg) + call flat3(savg,iz,nfa,nfb,3,1.0,savg) + savg=7.0*savg endif 900 npts8=k/8 diff --git a/mainwindow.cpp b/mainwindow.cpp index 707aed805..d5b646854 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//-------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" diff --git a/soundout.cpp b/soundout.cpp index cf0309a4f..cc14fe8e2 100644 --- a/soundout.cpp +++ b/soundout.cpp @@ -17,31 +17,30 @@ bool SoundOutput::audioError () const bool result (true); Q_ASSERT_X (m_stream, "SoundOutput", "programming error"); - if (m_stream) + if (m_stream) { + switch (m_stream->error ()) { - switch (m_stream->error ()) - { - case QAudio::OpenError: - Q_EMIT error (tr ("An error opening the audio output device has occurred.")); - break; + case QAudio::OpenError: + Q_EMIT error (tr ("An error opening the audio output device has occurred.")); + break; - case QAudio::IOError: - Q_EMIT error (tr ("An error occurred during write to the audio output device.")); - break; + case QAudio::IOError: + Q_EMIT error (tr ("An error occurred during write to the audio output device.")); + break; - case QAudio::UnderrunError: - Q_EMIT error (tr ("Audio data not being fed to the audio output device fast enough.")); - break; + case QAudio::UnderrunError: + Q_EMIT error (tr ("Audio data not being fed to the audio output device fast enough.")); + break; - case QAudio::FatalError: - Q_EMIT error (tr ("Non-recoverable error, audio output device not usable at this time.")); - break; + case QAudio::FatalError: + Q_EMIT error (tr ("Non-recoverable error, audio output device not usable at this time.")); + break; - case QAudio::NoError: - result = false; - break; - } + case QAudio::NoError: + result = false; + break; } + } return result; }