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
This commit is contained in:
Joe Taylor 2006-01-04 21:02:30 +00:00
parent 3f2e2fd65f
commit 821f4c3b14
2 changed files with 5 additions and 2 deletions

View File

@ -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);

View File

@ -1,4 +1,4 @@
#----------------------------------------------------------- WSJT
#---------------------------------------------------------- WSJT
from Tkinter import *
from tkFileDialog import *
import Pmw