mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-20 02:52:00 -05:00
- Cleaned up portaudio-v19 compile/clean a bit
- Fixed more missing merges, start_threads needs to pass PttPort, devin_name devout_name - start_oss.c needs to use devin_name, devout_name git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@190 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8d353a5b3b
commit
99cd80593e
11
Makefile.in
11
Makefile.in
@ -86,15 +86,22 @@ OBJS2C = ${SRCS2C:.c=.o}
|
|||||||
# and mostly sorted
|
# and mostly sorted
|
||||||
# --db
|
# --db
|
||||||
#
|
#
|
||||||
|
# @NEEDPORTAUDIO@ will be filled in with libportaudio.a if portaudio is used
|
||||||
|
#
|
||||||
SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c
|
SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c
|
||||||
OBJS3C = ${SRCS3C:.c=.o}
|
OBJS3C = ${SRCS3C:.c=.o}
|
||||||
AUDIOSRCS = @AUDIO@
|
AUDIOSRCS = @AUDIO@
|
||||||
|
|
||||||
all: wsjt6
|
all: wsjt6
|
||||||
|
|
||||||
JT65code: $(OBJS1)
|
JT65code: $(OBJS1)
|
||||||
$(FC) -o JT65code $(OBJS1)
|
$(FC) -o JT65code $(OBJS1)
|
||||||
|
|
||||||
wsjt6: Audio.so #wsjt.spec
|
portaudio-v19/lib/libportaudio.a:
|
||||||
|
(cd portaudio-v19;./configure --with-jack=no)
|
||||||
|
(cd portaudio-v19;${MAKE})
|
||||||
|
|
||||||
|
wsjt6: @NEEDPORTAUDIO@ Audio.so #wsjt.spec
|
||||||
# ${PYTHON} c:\python23\installer\Build.py wsjt.spec
|
# ${PYTHON} c:\python23\installer\Build.py wsjt.spec
|
||||||
# ${RM} wsjt6
|
# ${RM} wsjt6
|
||||||
|
|
||||||
@ -116,4 +123,4 @@ wsjt.spec: wsjt.py astro.py g.py options.py palettes.py smeter.py specjt.py
|
|||||||
.PHONY : clean
|
.PHONY : clean
|
||||||
clean:
|
clean:
|
||||||
${RM} -f *.o *.so *~ JT65code wsjt6
|
${RM} -f *.o *.so *~ JT65code wsjt6
|
||||||
|
(cd portaudio-v19;${MAKE} clean)
|
||||||
|
@ -70,7 +70,7 @@ subroutine audio_init(ndin,ndout)
|
|||||||
! print*,'Audio INIT called.'
|
! print*,'Audio INIT called.'
|
||||||
ierr=start_threads(ndevin,ndevout,y1,y2,nmax,iwrite,iwave,nwave, &
|
ierr=start_threads(ndevin,ndevout,y1,y2,nmax,iwrite,iwave,nwave, &
|
||||||
11025,NSPB,TRPeriod,TxOK,ndebug,Transmitting, &
|
11025,NSPB,TRPeriod,TxOK,ndebug,Transmitting, &
|
||||||
Tsec,ngo,nmode,tbuf,ibuf,ndsec)
|
Tsec,ngo,nmode,tbuf,ibuf,ndsec,PttPort,devin_name,devout_name)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
14
configure
vendored
14
configure
vendored
@ -2,7 +2,7 @@
|
|||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59 for wsjt 5.9.2.
|
# Generated by GNU Autoconf 2.59 for wsjt 5.9.2.
|
||||||
#
|
#
|
||||||
# $Id: configure.ac 185 2006-07-05 03:49:02Z va3db $
|
# $Id: configure.ac 187 2006-07-05 15:32:17Z va3db $
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 Free Software Foundation, Inc.
|
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
# This configure script is free software; the Free Software Foundation
|
# This configure script is free software; the Free Software Foundation
|
||||||
@ -311,7 +311,7 @@ ac_includes_default="\
|
|||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT F77 FFLAGS ac_ct_F77 CPP EGREP SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RM CP MV LN SED AR LD TEST PYTHON F2PY G95 GFORTRAN OS CLOBBER FC_LIB_PATH FC AUDIO LIBOBJS LTLIBOBJS'
|
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT F77 FFLAGS ac_ct_F77 CPP EGREP SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RM CP MV LN SED AR LD TEST PYTHON F2PY G95 GFORTRAN OS CLOBBER FC_LIB_PATH FC AUDIO NEEDPORTAUDIO LIBOBJS LTLIBOBJS'
|
||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
@ -977,7 +977,7 @@ Copyright (C) 2003 Free Software Foundation, Inc.
|
|||||||
This configure script is free software; the Free Software Foundation
|
This configure script is free software; the Free Software Foundation
|
||||||
gives unlimited permission to copy, distribute and modify it.
|
gives unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
$Id: configure.ac 185 2006-07-05 03:49:02Z va3db $
|
$Id: configure.ac 187 2006-07-05 15:32:17Z va3db $
|
||||||
_ACEOF
|
_ACEOF
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -6749,7 +6749,12 @@ _ACEOF
|
|||||||
|
|
||||||
AUDIO="a2d.f90 jtaudio.c start_portaudio.c"
|
AUDIO="a2d.f90 jtaudio.c start_portaudio.c"
|
||||||
|
|
||||||
LDFLAGS="-Lportaudio-v19/lib/libportaudio.a ${LDFLAGS} -lsamplerate"
|
NEEDPORTAUDIO="portaudio-v19/lib/libportaudio.a"
|
||||||
|
|
||||||
|
LDFLAGS="portaudio-v19/lib/libportaudio.a ${LDFLAGS} -lsamplerate"
|
||||||
|
else
|
||||||
|
NEEDPORTAUDIO=""
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$jack" = yes; then
|
if test "$jack" = yes; then
|
||||||
@ -7517,6 +7522,7 @@ s,@CLOBBER@,$CLOBBER,;t t
|
|||||||
s,@FC_LIB_PATH@,$FC_LIB_PATH,;t t
|
s,@FC_LIB_PATH@,$FC_LIB_PATH,;t t
|
||||||
s,@FC@,$FC,;t t
|
s,@FC@,$FC,;t t
|
||||||
s,@AUDIO@,$AUDIO,;t t
|
s,@AUDIO@,$AUDIO,;t t
|
||||||
|
s,@NEEDPORTAUDIO@,$NEEDPORTAUDIO,;t t
|
||||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||||
CEOF
|
CEOF
|
||||||
|
@ -314,7 +314,10 @@ fi
|
|||||||
if test "$portaudio" = yes; then
|
if test "$portaudio" = yes; then
|
||||||
AC_DEFINE(USE_PORTAUDIO, 1, [Define if you want PORTAUDIO used.])
|
AC_DEFINE(USE_PORTAUDIO, 1, [Define if you want PORTAUDIO used.])
|
||||||
AC_SUBST(AUDIO, "a2d.f90 jtaudio.c start_portaudio.c")
|
AC_SUBST(AUDIO, "a2d.f90 jtaudio.c start_portaudio.c")
|
||||||
|
AC_SUBST(NEEDPORTAUDIO, "portaudio-v19/lib/libportaudio.a")
|
||||||
LDFLAGS="-Lportaudio-v19/lib/libportaudio.a ${LDFLAGS} -lsamplerate"
|
LDFLAGS="-Lportaudio-v19/lib/libportaudio.a ${LDFLAGS} -lsamplerate"
|
||||||
|
else
|
||||||
|
AC_SUBST(NEEDPORTAUDIO, "")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$jack" = yes; then
|
if test "$jack" = yes; then
|
||||||
|
@ -35,7 +35,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
|
|||||||
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
|
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
|
||||||
/^[ ]*VPATH[ ]*=[^:]*$/d
|
/^[ ]*VPATH[ ]*=[^:]*$/d
|
||||||
|
|
||||||
s%@SHELL@%/usr/local/bin/bash%g
|
s%@SHELL@%/bin/sh%g
|
||||||
s%@CFLAGS@%-g -O2 -Wall -pedantic -pipe -fPIC -DPA_LITTLE_ENDIAN%g
|
s%@CFLAGS@%-g -O2 -Wall -pedantic -pipe -fPIC -DPA_LITTLE_ENDIAN%g
|
||||||
s%@CPPFLAGS@%%g
|
s%@CPPFLAGS@%%g
|
||||||
s%@CXXFLAGS@%%g
|
s%@CXXFLAGS@%%g
|
||||||
|
26
start_oss.c
26
start_oss.c
@ -80,7 +80,8 @@ start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
|
|||||||
int *nwave, int *nfsample, int *nsamperbuf,
|
int *nwave, int *nfsample, int *nsamperbuf,
|
||||||
int *TRPeriod, int *TxOK, int *ndebug,
|
int *TRPeriod, int *TxOK, int *ndebug,
|
||||||
int *Transmitting, double *Tsec, int *ngo, int *nmode,
|
int *Transmitting, double *Tsec, int *ngo, int *nmode,
|
||||||
double tbuf[], int *ibuf, int *ndsec)
|
double tbuf[], int *ibuf, int *ndsec,
|
||||||
|
char *PttPort, char *devin_name, char *devout_name)
|
||||||
{
|
{
|
||||||
pthread_t thread1,thread2;
|
pthread_t thread1,thread2;
|
||||||
int iret1,iret2;
|
int iret1,iret2;
|
||||||
@ -90,14 +91,19 @@ start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
|
|||||||
int format;
|
int format;
|
||||||
int channels;
|
int channels;
|
||||||
double dnfs;
|
double dnfs;
|
||||||
|
int i;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
p = strchr(devin_name, ' ');
|
||||||
|
if(p != NULL)
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
p = strchr(devin_name, '/');
|
||||||
|
if(p != NULL)
|
||||||
|
snprintf(dsp_in, MAXDSPNAME, "%s", devin_name); /* assume /dev/... */
|
||||||
|
else
|
||||||
|
snprintf(dsp_in, MAXDSPNAME, "/dev/%s", devin_name);
|
||||||
|
|
||||||
/* XXX OSS device is decoded from ndevin and ndevout
|
|
||||||
* This is not strictly speaking the way to do it and is
|
|
||||||
* probably specific to FreeBSD for now.
|
|
||||||
* i.e. the .0 addition is a vchan; I'll add configure magic later. --db
|
|
||||||
*/
|
|
||||||
snprintf(dsp_in, MAXDSPNAME,
|
|
||||||
"/dev/dsp%d.0", *ndevin);
|
|
||||||
dsp_in[MAXDSPNAME] = '\0';
|
dsp_in[MAXDSPNAME] = '\0';
|
||||||
|
|
||||||
data.fd_in = open (dsp_in, O_RDWR, 0);
|
data.fd_in = open (dsp_in, O_RDWR, 0);
|
||||||
@ -107,15 +113,13 @@ start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*ndevin == *ndevout) {
|
|
||||||
data.fd_out = data.fd_in;
|
data.fd_out = data.fd_in;
|
||||||
strncpy(dsp_out, dsp_in, sizeof(dsp_out));
|
strncpy(dsp_out, dsp_in, sizeof(dsp_out));
|
||||||
dsp_out[sizeof(dsp_out)] = '\0';
|
dsp_out[sizeof(dsp_out)] = '\0';
|
||||||
|
|
||||||
if (ioctl(data.fd_in, SNDCTL_DSP_SETDUPLEX, 0) < 0) {
|
if (ioctl(data.fd_in, SNDCTL_DSP_SETDUPLEX, 0) < 0) {
|
||||||
fprintf(stderr, "Cannot use %s for full duplex.\n", dsp_in);
|
fprintf(stderr, "Cannot use %s for full duplex.\n", dsp_in);
|
||||||
exit(-1);
|
return(-1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Tsec = Tsec;
|
data.Tsec = Tsec;
|
||||||
|
Loading…
Reference in New Issue
Block a user