mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
- 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:
parent
17c69c2bd8
commit
5297378423
18
start_oss.c
18
start_oss.c
@ -166,9 +166,11 @@ start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
|
|||||||
printf("Rate set = %d\n", rate);
|
printf("Rate set = %d\n", rate);
|
||||||
|
|
||||||
// printf("start_threads: creating thread for oss_loop\n");
|
// printf("start_threads: creating thread for oss_loop\n");
|
||||||
iret1 = pthread_create(&thread1,NULL,oss_loop,&iarg1);
|
iret1 = pthread_create(&thread1, NULL,
|
||||||
printf("start_threads: creating thread for decode1_\n");
|
(void *(*)(void *))oss_loop, &iarg1);
|
||||||
// iret2 = pthread_create(&thread2,NULL,decode1_,&iarg2);
|
// printf("start_threads: creating thread for decode1_\n");
|
||||||
|
iret2 = pthread_create(&thread2, NULL,
|
||||||
|
(void *(*)(void *))decode1_,&iarg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -230,7 +232,7 @@ oss_loop(int *iarg)
|
|||||||
if(ib>=FRAMESPERBUFFER)
|
if(ib>=FRAMESPERBUFFER)
|
||||||
ib=0;
|
ib=0;
|
||||||
*(data.ibuf) = ib;
|
*(data.ibuf) = ib;
|
||||||
in = rcv_buf; // XXX
|
in = (int16_t *)rcv_buf; // XXX
|
||||||
for(i=0; i<FRAMESPERBUFFER; i++) {
|
for(i=0; i<FRAMESPERBUFFER; i++) {
|
||||||
data.y1[ia] = (*in++);
|
data.y1[ia] = (*in++);
|
||||||
data.y2[ia] = (*in++);
|
data.y2[ia] = (*in++);
|
||||||
@ -256,7 +258,7 @@ oss_loop(int *iarg)
|
|||||||
}
|
}
|
||||||
TxOKz = *(data.TxOK);
|
TxOKz = *(data.TxOK);
|
||||||
*(data.Transmitting) = *(data.TxOK);
|
*(data.Transmitting) = *(data.TxOK);
|
||||||
wptr = tx_buf; /* XXX */
|
wptr = (int16_t *)tx_buf; /* XXX */
|
||||||
for(i=0 ; i<FRAMESPERBUFFER; i++ ) {
|
for(i=0 ; i<FRAMESPERBUFFER; i++ ) {
|
||||||
if(*(data.TxOK)) {
|
if(*(data.TxOK)) {
|
||||||
n2 = data.iwave[ic];
|
n2 = data.iwave[ic];
|
||||||
@ -275,7 +277,11 @@ oss_loop(int *iarg)
|
|||||||
*wptr++ = 0; /* right */
|
*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 */
|
fivehztx_(); /* Call fortran routine */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user