From 994a490cddd036782fbf0c48905e4530ee5c9701 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 10 May 2019 13:58:01 -0400 Subject: [PATCH] Change output sound buffer to 200 ms (was 2000 ms). --- robots/go | 2 ++ robots/robo.f90 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ soundout.cpp | 3 +++ 3 files changed, 53 insertions(+) create mode 100644 robots/go create mode 100644 robots/robo.f90 diff --git a/robots/go b/robots/go new file mode 100644 index 000000000..9a7c9f3dd --- /dev/null +++ b/robots/go @@ -0,0 +1,2 @@ +curl https://pskreporter.info/cgi-bin/robot.pl > robo.dat +robo | sort -nr -k2 diff --git a/robots/robo.f90 b/robots/robo.f90 new file mode 100644 index 000000000..69650a149 --- /dev/null +++ b/robots/robo.f90 @@ -0,0 +1,48 @@ +program robo + +! Examine spots from PSK Reporter for past week to identify probable robots + +! In a bash shell, from command line: +! $ curl https://pskreporter.info/cgi-bin/robot.pl > robo.dat +! $ robo | sort -nr -k2 + + parameter (NCHARS=20000) + parameter (NMAX=100) + + character*1 c + character*20000 blob + character*12 callsign(0:NMAX) + integer*1 ic1 + + open(10,file='robo.dat',status='old',access='stream') + callsign=' ' + + do ichar=1,NCHARS + read(10,end=10) ic1 + ic=ic1 + if(ic.lt.0) ic=ic+256 + c=char(ic) + blob(ichar:ichar)=c + enddo +10 continue + + do icall=1,NMAX + i1=index(blob,'":{"median_minutes":')-1 + do i=i1,i1-10,-1 + if(i1.lt.1) go to 20 + if(blob(i:i).eq.'"') exit + enddo + i0=i+1 + callsign(icall)=blob(i0:i1) + i2=index(blob,',')-1 + read(blob(i1+21:i2),*) median_minutes + i3=index(blob,'median_hours')+14 + i4=index(blob,'}')-1 + read(blob(i3:i4),*) median_hours + write(*,3001) median_minutes,median_hours,trim(callsign(icall)) +3001 format(2i5,2x,a) + blob=blob(i4+3:) + enddo + +20 continue +end program robo diff --git a/soundout.cpp b/soundout.cpp index b21675b3a..0264ad91e 100644 --- a/soundout.cpp +++ b/soundout.cpp @@ -9,11 +9,14 @@ #include "moc_soundout.cpp" +/* #if defined (WIN32) # define MS_BUFFERED 1000u #else # define MS_BUFFERED 2000u #endif +*/ +# define MS_BUFFERED 200u bool SoundOutput::audioError () const {