From 4d4be80421d5b42f56a82f6397a930447cee4522 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 4 Jan 2006 21:02:30 +0000 Subject: [PATCH] Passed ndsec to capture callback, as required. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@45 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- start_threads.c | 5 ++++- wsjt.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/start_threads.c b/start_threads.c index b8d3aac9f..2b5f41a9b 100644 --- a/start_threads.c +++ b/start_threads.c @@ -31,6 +31,7 @@ typedef struct alsa_driver_s { double *Tsec; double *tbuf; int *ibuf; + int *ndsec; snd_pcm_uframes_t buffer_size; snd_pcm_uframes_t period_size; @@ -325,7 +326,8 @@ int capture_callback(alsa_driver_t *alsa_driver_capture) { snd_pcm_status_dump(pcm_stat, jcd_out); #endif gettimeofday(&tv, NULL); - stime = (double) tv.tv_sec + ((double)tv.tv_usec / 1000000.0); + stime = (double) tv.tv_sec + ((double)tv.tv_usec / 1000000.0) + + *(this->ndsec)*0.1; *(this->Tsec)=stime; ib=*(this->ibuf); this->tbuf[ib++]=stime; @@ -429,6 +431,7 @@ int start_threads_(int *ndevin, int *ndevout, short y1[], short y2[], alsa_driver_capture.Tsec=Tsec; alsa_driver_capture.tbuf=tbuf; alsa_driver_capture.ibuf=ibuf; + alsa_driver_capture.ndsec=ndsec; printf("start threads called\n"); iret1 = pthread_create(&thread1,NULL,decode1_,&iarg1); diff --git a/wsjt.py b/wsjt.py index fd5721d88..a26545e94 100644 --- a/wsjt.py +++ b/wsjt.py @@ -1,4 +1,4 @@ -#----------------------------------------------------------- WSJT +#---------------------------------------------------------- WSJT from Tkinter import * from tkFileDialog import * import Pmw