From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- lib/genwave.f90 | 104 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) (limited to 'lib/genwave.f90') diff --git a/lib/genwave.f90 b/lib/genwave.f90 index 8cd47269..7db4cc7d 100755 --- a/lib/genwave.f90 +++ b/lib/genwave.f90 @@ -1,52 +1,52 @@ -subroutine genwave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wave) - - real wave(nwave) - complex cwave(nwave) - integer hmod - integer itone(nsym) - logical ex - real*8 dt,phi,dphi,twopi,freq,baud - - dt=1.d0/fsample - twopi=8.d0*atan(1.d0) - baud=fsample/nsps - -! Calculate the audio waveform - phi=0.d0 - if(icmplx.le.0) wave=0. - if(icmplx.eq.1) cwave=0. - k=0 - do j=1,nsym - freq=f0 + itone(j)*hmod*baud - dphi=twopi*freq*dt - do i=1,nsps - k=k+1 - if(icmplx.eq.1) then - cwave(k)=cmplx(cos(phi),sin(phi)) - else - wave(k)=sin(phi) - endif - phi=phi+dphi - if(phi.gt.twopi) phi=phi-twopi - enddo - enddo - -!### TEMPORARY code to allow transmitting both A and B submodes - inquire(file='Q65_Tx2',exist=ex) - if(ex) then - k=0 - do j=1,nsym - freq=f0 + itone(j)*2.d0*hmod*baud + 500.d0 - dphi=twopi*freq*dt - do i=1,nsps - k=k+1 - wave(k)=0.5*(wave(k)+sin(phi)) - phi=phi+dphi - if(phi.gt.twopi) phi=phi-twopi - enddo - enddo - endif -!### - - return -end subroutine genwave +subroutine genwave(itone,nsym,nsps,nwave,fsample,hmod,f0,icmplx,cwave,wave) + + real wave(nwave) + complex cwave(nwave) + integer hmod + integer itone(nsym) + logical ex + real*8 dt,phi,dphi,twopi,freq,baud + + dt=1.d0/fsample + twopi=8.d0*atan(1.d0) + baud=fsample/nsps + +! Calculate the audio waveform + phi=0.d0 + if(icmplx.le.0) wave=0. + if(icmplx.eq.1) cwave=0. + k=0 + do j=1,nsym + freq=f0 + itone(j)*hmod*baud + dphi=twopi*freq*dt + do i=1,nsps + k=k+1 + if(icmplx.eq.1) then + cwave(k)=cmplx(cos(phi),sin(phi)) + else + wave(k)=sin(phi) + endif + phi=phi+dphi + if(phi.gt.twopi) phi=phi-twopi + enddo + enddo + +!### TEMPORARY code to allow transmitting both A and B submodes + inquire(file='Q65_Tx2',exist=ex) + if(ex) then + k=0 + do j=1,nsym + freq=f0 + itone(j)*2.d0*hmod*baud + 500.d0 + dphi=twopi*freq*dt + do i=1,nsps + k=k+1 + wave(k)=0.5*(wave(k)+sin(phi)) + phi=phi+dphi + if(phi.gt.twopi) phi=phi-twopi + enddo + enddo + endif +!### + + return +end subroutine genwave -- cgit v1.2.3