- Commented out the wrong line!

- cleaned up compiler warnings (added a few casts)
- transmit appears to work



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@108 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Diane Bruce 2006-01-15 21:43:30 +00:00
parent 6bdb14bff1
commit 78c9bb6585
1 changed files with 13 additions and 7 deletions

View File

@ -166,9 +166,11 @@ start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
printf("Rate set = %d\n", rate);
// printf("start_threads: creating thread for oss_loop\n");
iret1 = pthread_create(&thread1,NULL,oss_loop,&iarg1);
printf("start_threads: creating thread for decode1_\n");
// iret2 = pthread_create(&thread2,NULL,decode1_,&iarg2);
iret1 = pthread_create(&thread1, NULL,
(void *(*)(void *))oss_loop, &iarg1);
// printf("start_threads: creating thread for decode1_\n");
iret2 = pthread_create(&thread2, NULL,
(void *(*)(void *))decode1_,&iarg2);
}
/*
@ -229,8 +231,8 @@ oss_loop(int *iarg)
data.tbuf[ib++] = stime;
if(ib>=FRAMESPERBUFFER)
ib=0;
*(data.ibuf)=ib;
in = rcv_buf; // XXX
*(data.ibuf) = ib;
in = (int16_t *)rcv_buf; // XXX
for(i=0; i<FRAMESPERBUFFER; i++) {
data.y1[ia] = (*in++);
data.y2[ia] = (*in++);
@ -256,7 +258,7 @@ oss_loop(int *iarg)
}
TxOKz = *(data.TxOK);
*(data.Transmitting) = *(data.TxOK);
wptr = tx_buf; /* XXX */
wptr = (int16_t *)tx_buf; /* XXX */
for(i=0 ; i<FRAMESPERBUFFER; i++ ) {
if(*(data.TxOK)) {
n2 = data.iwave[ic];
@ -275,7 +277,11 @@ oss_loop(int *iarg)
*wptr++ = 0; /* right */
}
}
write(data.fd_out, tx_buf, AUDIOBUFSIZE);
if (write(data.fd_out, tx_buf, AUDIOBUFSIZE) < 0) {
fprintf(stderr, "Can't write to soundcard.\n");
exit(-1);
}
fivehztx_(); /* Call fortran routine */
}
}