1
0
mirror of https://github.com/saitohirga/WSJT-X.git synced 2025-03-21 03:28:59 -04:00

Activate the Gain co0ntrol in QMAP's "File -> Settings -> I/O Devices".

This commit is contained in:
Joe Taylor 2023-12-08 14:06:15 -05:00
parent ac1b5d03b2
commit 115c4c4e30
3 changed files with 13 additions and 11 deletions

View File

@ -1,4 +1,4 @@
subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8)
subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,ndb)
! Reformat timf2 data from Linrad and stuff data into r*4 array dd().
@ -16,6 +16,7 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8)
equivalence (kd,d4)
equivalence (jd,d8,yd)
gain=10.0**(0.05*ndb)
if(nblock2.eq.-9999) nblock2=-9998 !Silence a compiler warning
if(nsam.eq.-1) then
! Move data from the UDP packet buffer into array dd().
@ -23,15 +24,15 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8)
do i=1,174 !One RF channel, r*4 data
k=k+1
d8=buf8(i)
dd(1,k)=yd(1)
dd(2,k)=yd(2)
dd(1,k)=yd(1)*gain
dd(2,k)=yd(2)*gain
enddo
else if(userx_no.eq.1) then
do i=1,348 !One RF channel, i*2 data
k=k+1
d4=buf4(i)
dd(1,k)=kd(1)
dd(2,k)=kd(2)
dd(1,k)=kd(1)*gain
dd(2,k)=kd(2)*gain
enddo
endif
else
@ -39,12 +40,12 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8)
do i=1,nsam !One RF channel, r*4 data
k=k+1
d4=buf4(i)
dd(1,k)=kd(1)
dd(2,k)=kd(2)
dd(1,k)=kd(1)*gain
dd(2,k)=kd(2)*gain
k=k+1
dd(1,k)=kd(1)
dd(2,k)=kd(2)
dd(1,k)=kd(1)*gain
dd(2,k)=kd(2)*gain
enddo
endif
endif

View File

@ -208,7 +208,7 @@ void SoundInThread::inputUDP()
// If buffer will not overflow, move data into datcom_
if ((k+iz) <= 60*96000) {
int nsam=-1;
recvpkt_(&nsam, &b.iblk, &b.nrx, &k, b.d8, b.d8);
recvpkt_(&nsam, &b.iblk, &b.nrx, &k, b.d8, b.d8, &m_dB);
datcom_.fcenter=b.cfreq + m_fAdd;
}
m_hsym=(k-2048)/14400; //14400 = 0.15 * 96000

View File

@ -67,7 +67,8 @@ private:
};
extern "C" {
void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[], double s2[]);
void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k,
double s1[], double s2[], int* ndb);
}
#endif // SOUNDIN_H