mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-19 02:22:10 -05:00
2858f3b9c9
--enable options. This will have to be cleaned up a lot more to minimise #ifdef's a2d_() is needed for portaudio which is needed by both windows and *nix but only a small piece of start_threads.c is needed for portaudio the ALSA part is #ifdef'd out when USE_PORTAUDIO is enabled. audio_init.f90 and a2d.f90 now have #ifdef's on USE_PORTAUDIO instead of Win32. Lots to do still. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@73 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
40 lines
1.2 KiB
Fortran
40 lines
1.2 KiB
Fortran
!---------------------------------------------------- a2d
|
|
subroutine a2d(iarg)
|
|
|
|
#if 1
|
|
!--- # ifdef USE_PORTAUDIO
|
|
! Start the PortAudio streams for audio input and output.
|
|
integer nchin(0:20),nchout(0:20)
|
|
include 'gcom1.f90'
|
|
include 'gcom2.f90'
|
|
|
|
! This call does not normally return, as the background portion of
|
|
! JTaudio goes into a test-and-sleep loop.
|
|
|
|
idevin=ndevin
|
|
idevout=ndevout
|
|
call padevsub(numdevs,ndefin,ndefout,nchin,nchout)
|
|
|
|
write(*,1002) ndefin,ndefout
|
|
1002 format(/'Default Input:',i3,' Output:',i3)
|
|
write(*,1004) idevin,idevout
|
|
1004 format('Requested Input:',i3,' Output:',i3)
|
|
if(idevin.lt.0 .or. idevin.ge.numdevs) idevin=ndefin
|
|
if(idevout.lt.0 .or. idevout.ge.numdevs) idevout=ndefout
|
|
if(idevin.eq.0 .and. idevout.eq.0) then
|
|
idevin=ndefin
|
|
idevout=ndefout
|
|
endif
|
|
ierr=jtaudio(idevin,idevout,y1,y2,NMAX,iwrite,iwave,nwave, &
|
|
11025,NSPB,TRPeriod,TxOK,ndebug,Transmitting, &
|
|
Tsec,ngo,nmode,tbuf,ibuf,ndsec)
|
|
if(ierr.ne.0) then
|
|
print*,'Error ',ierr,' in JTaudio, cannot continue.'
|
|
else
|
|
write(*,1006)
|
|
1006 format('Audio streams terminated normally.')
|
|
endif
|
|
#endif
|
|
return
|
|
end subroutine a2d
|