Updaet to version 6.1e

This commit is contained in:
angelos 1999-01-16 04:25:07 +00:00
parent c8ef5ebef3
commit fbbf6ee1cf
8 changed files with 98 additions and 301 deletions

View File

@ -1,14 +1,12 @@
# $OpenBSD: Makefile,v 1.1.1.1 1998/09/14 02:48:34 marc Exp $
# $OpenBSD: Makefile,v 1.2 1999/01/16 04:25:07 angelos Exp $
#
DISTNAME= speak_freely-6.1c
DISTNAME= speak_freely-6.1e
CATEGORIES= mbone audio security
MASTER_SITES= http://www.fourmilab.ch/speakfree/unix/
MAINTAINER= angelos@openbsd.org
LIB_DEPENDS= gsm\\.1\\.0:${PORTSDIR}/audio/gsm
UTILS= sfspeaker sfmike sflwl
DEMNS= sfecho sflwld
DDEMNS= sfvod

View File

@ -1 +1 @@
MD5 (speak_freely-6.1c.tar.gz) = 52f42e45bd78ddd069c8ef81d8bc8e83
MD5 (speak_freely-6.1e.tar.gz) = cabc5976a082cf6707304fc799691b94

View File

@ -1,28 +1,26 @@
*** Makefile.orig Mon Jul 21 17:06:21 1997
--- Makefile Wed Sep 24 02:36:37 1997
*** Makefile.orig Fri Jan 15 22:57:47 1999
--- Makefile Fri Jan 15 23:02:03 1999
***************
*** 32,40 ****
# THREADS, you can also remove the "-lpthread" library specification
# from the LFLAGS line, which may cause an error if the system does
# not include the POSIX threads library.
! CC = cc -fsingle # for Sun Compiler
! CCFLAGS = -DSolaris -DTHREADS
! LFLAGS = -lcurses -lsocket -lnsl -lm -lpthread
*** 21,28 ****
# option may speed up certain compression modes. If you get a
# warning about -float being ignored in non -cckr compiles, it
# has no effect on your system.
! CC = cc -signed
! LFLAGS = -laudio -lcurses -lm
# FreeBSD 2.2 courtesy of Andrey A. Chernov
#
--- 32,40 ----
# THREADS, you can also remove the "-lpthread" library specification
# from the LFLAGS line, which may cause an error if the system does
# not include the POSIX threads library.
! #CC = cc -fsingle # for Sun Compiler
! #CCFLAGS = -DSolaris -DTHREADS
! #LFLAGS = -lcurses -lsocket -lnsl -lm -lpthread
# SunOS 4.1.x
#CC = cc -fsingle -DOLDCC
--- 21,28 ----
# option may speed up certain compression modes. If you get a
# warning about -float being ignored in non -cckr compiles, it
# has no effect on your system.
! #CC = cc -signed
! #LFLAGS = -laudio -lcurses -lm
# FreeBSD 2.2 courtesy of Andrey A. Chernov
#
# SunOS 4.1.x
#CC = cc -fsingle -DOLDCC
***************
*** 46,53 ****
*** 52,59 ****
# Depending on how your driver handles non-blocking I/O,
# you may also have to add -DAUDIO_BLOCKING to the
# CCFLAGS line.
@ -31,18 +29,18 @@
# ** Linux users please note: many Linux audio drivers are
# half-duplex, even through your sound card may actually
--- 46,54 ----
--- 52,60 ----
# Depending on how your driver handles non-blocking I/O,
# you may also have to add -DAUDIO_BLOCKING to the
# CCFLAGS line.
! PREFIX=/usr/local
! CCFLAGS = -DM_LITTLE_ENDIAN
! LFLAGS = -L${PREFIX}/lib -lcurses -ltermcap -lcompat -lm -lossaudio
! LFLAGS = -lcurses -ltermcap -lcompat -lm -lossaudio
# ** Linux users please note: many Linux audio drivers are
# half-duplex, even through your sound card may actually
***************
*** 78,87 ****
*** 98,107 ****
# Where Perl is located on your system. This is used to make
# a directly-executable version of sfvod.
@ -53,7 +51,7 @@
# If your getdomainname() does not return the DNS domainname, define:
#DOMAIN=-DMYDOMAIN=\"somedomain.net\"
--- 79,88 ----
--- 99,108 ----
# Where Perl is located on your system. This is used to make
# a directly-executable version of sfvod.
@ -65,127 +63,29 @@
# If your getdomainname() does not return the DNS domainname, define:
#DOMAIN=-DMYDOMAIN=\"somedomain.net\"
***************
*** 108,118 ****
*** 127,138 ****
CARGS = -DInternet_Port=$(INTERNET_PORT)
#DEBUG = -g -DHEXDUMP
! DEBUG = -O
! DEBUG = -g -DHEXDUMP
! #DEBUG = -O
# Compiler flags
! CFLAGS = $(DEBUG) -Iadpcm -Ilpc -Igsm/inc -Imd5 -Iidea -Ilibdes $(CARGS) $(DUPLEX) $(CCFLAGS) $(DOMAIN)
PROGRAMS = sfspeaker sfmike sflwld sflwl sfecho sfvod
PROGRAMS = sfspeaker sfmike sflwld sflwl sfecho sfreflect sfvod
--- 128,139 ----
--- 109,127 ----
CARGS = -DInternet_Port=$(INTERNET_PORT)
#DEBUG = -g -DHEXDUMP
! #DEBUG = -O
!
! .if exists(/usr/lib/libdes.a)
! LDES=-ldes
! IDES=
! .else
! LDES=libdes/libdes.a
! IDES=-Ilibdes
! .endif
! #DEBUG = -g -DHEXDUMP
! DEBUG = -O
# Compiler flags
! CFLAGS += $(DEBUG) -Iadpcm -Ilpc -Iidea $(IDES) -I/usr/include -I${PREFIX}/include $(CARGS) $(DUPLEX) $(CCFLAGS) $(DOMAIN)
! CFLAGS = $(DEBUG) -I${PREFIX}/include -Iadpcm -Ilpc -Igsm/inc -Imd5 -Iidea -Ilibdes $(CARGS) $(DUPLEX) $(CCFLAGS) $(DOMAIN)
PROGRAMS = sfspeaker sfmike sflwld sflwl sfecho sfvod
PROGRAMS = sfspeaker sfmike sflwld sflwl sfecho sfreflect sfvod
***************
*** 120,132 ****
SPKROBJS = speaker.o codecs.o deskey.o g711.o rate.o rtpacket.o soundbyte.o ulaw.o usleep.o vatpkt.o vox.o hp_audio.o
! sfspeaker: $(SPKROBJS) adpcmlib.o lpclib.o lpc10lib.o gsmlib.o deslib.o md5lib.o idealib.o libdes.o xdsub.o
! $(CC) $(SPKROBJS) adpcm/adpcm-u.o des/des.o md5/md5.o idea/idea.o lpc10/liblpc10.a gsm/lib/libgsm.a lpc/lpc.o xdsub.o libdes/libdes.a $(LFLAGS) -o sfspeaker
MIKEOBJS = mike.o codecs.o deskey.o g711.o rate.o rtpacket.o soundbyte.o ulaw.o usleep.o vatpkt.o xdsub.o hp_audio.o
! sfmike: $(MIKEOBJS) adpcmlib.o lpclib.o lpc10lib.o gsmlib.o deslib.o md5lib.o idealib.o libdes.o
! $(CC) $(MIKEOBJS) adpcm/adpcm-u.o des/des.o md5/md5.o idea/idea.o -lm lpc10/liblpc10.a gsm/lib/libgsm.a lpc/lpc.o libdes/libdes.a $(LFLAGS) -o sfmike
LWLDOBJS = lwld.o xdsub.o
--- 129,141 ----
SPKROBJS = speaker.o codecs.o deskey.o g711.o rate.o rtpacket.o soundbyte.o ulaw.o usleep.o vatpkt.o vox.o hp_audio.o
! sfspeaker: $(SPKROBJS) adpcmlib.o lpclib.o lpc10lib.o deslib.o idealib.o libdes.o xdsub.o
! $(CC) $(SPKROBJS) adpcm/adpcm-u.o des/des.o idea/idea.o lpc10/liblpc10.a -lgsm -lossaudio lpc/lpc.o xdsub.o $(LDES) $(LFLAGS) -o sfspeaker
MIKEOBJS = mike.o codecs.o deskey.o g711.o rate.o rtpacket.o soundbyte.o ulaw.o usleep.o vatpkt.o xdsub.o hp_audio.o
! sfmike: $(MIKEOBJS) adpcmlib.o lpclib.o lpc10lib.o deslib.o idealib.o libdes.o
! $(CC) $(MIKEOBJS) adpcm/adpcm-u.o des/des.o idea/idea.o -lm lpc10/liblpc10.a -lgsm -lossaudio lpc/lpc.o $(LDES) $(LFLAGS) -o sfmike
LWLDOBJS = lwld.o xdsub.o
***************
*** 140,147 ****
ECHOOBJS = echo.o codecs.o g711.o rtpacket.o ulaw.o xdsub.o
! sfecho: $(ECHOOBJS) md5lib.o
! $(CC) $(ECHOOBJS) md5/md5.o adpcm/adpcm-u.o lpc/lpc.o $(LFLAGS) -o sfecho
sfvod: sfvod.pl
echo \#\! $(PERL) >sfvod
--- 149,156 ----
ECHOOBJS = echo.o codecs.o g711.o rtpacket.o ulaw.o xdsub.o
! sfecho: $(ECHOOBJS)
! $(CC) $(ECHOOBJS) adpcm/adpcm-u.o lpc/lpc.o $(LFLAGS) -o sfecho
sfvod: sfvod.pl
echo \#\! $(PERL) >sfvod
***************
*** 157,167 ****
chmod 755 sfvod
adpcmlib.o:
! ( echo "Building ADPCM library."; cd adpcm ; make CC="$(CC)" )
echo "ADPCM" >adpcmlib.o
libdes.o:
( echo "Building LIBDES library."; cd libdes ; make -f Makefile.sf CC="$(CC) $(CCFLAGS) $(DEBUG)" )
echo "LIBDES" >libdes.o
lpclib.o:
--- 166,178 ----
chmod 755 sfvod
adpcmlib.o:
! ( echo "Building ADPCM library."; cd adpcm ; make CC="$(CC) $(CCFLAGS)" )
echo "ADPCM" >adpcmlib.o
libdes.o:
+ .if !exists(/usr/lib/libdes.a)
( echo "Building LIBDES library."; cd libdes ; make -f Makefile.sf CC="$(CC) $(CCFLAGS) $(DEBUG)" )
+ .endif
echo "LIBDES" >libdes.o
lpclib.o:
***************
*** 185,191 ****
echo "MD5" >md5lib.o
idealib.o:
! ( echo "Building IDEA library."; cd idea ; make CC="$(CC)" )
echo "IDEA" >idealib.o
codecs.o: codecs.c speakfree.h
--- 196,202 ----
echo "MD5" >md5lib.o
idealib.o:
! ( echo "Building IDEA library."; cd idea ; make CC="$(CC) $(CCFLAGS)" )
echo "IDEA" >idealib.o
codecs.o: codecs.c speakfree.h

View File

@ -1,15 +0,0 @@
*** lpc/lpc.c.bak Tue Apr 23 14:33:25 1996
--- lpc/lpc.c Fri Oct 25 17:43:12 1996
***************
*** 8,15 ****
--- 8,17 ----
#if defined(Solaris) || defined(HEWLETT_PACKARD) || defined(__FreeBSD__)
#include <stdlib.h>
+ #ifndef __FreeBSD__
#define random lrand48
#define bcopy(a, b, n) memmove(b, a, n)
+ #endif
#endif
#define MAXWINDOW 1000 /* Max analysis window length */

View File

@ -1,14 +1,14 @@
*** mike.c.orig Tue Apr 23 14:45:52 1996
--- mike.c Fri Oct 25 19:11:15 1996
*** mike.c.orig Fri Jan 15 23:10:04 1999
--- mike.c Fri Jan 15 23:11:40 1999
***************
*** 687,692 ****
--- 687,695 ----
*** 748,753 ****
--- 748,756 ----
(sb->buffer.buffer_len > 16)) {
pktlen += sizeof(sb->sendinghost);
}
+ /* must stay in network order for debugging output */
+ sb->compression = htonl(sb->compression);
+ sb->buffer.buffer_len = htonl(sb->buffer.buffer_len);
+ /* must stay in network order for debugging output */
+ sb->compression = htonl(sb->compression);
+ sb->buffer.buffer_len = htonl(sb->buffer.buffer_len);
}
}
}

View File

@ -1,74 +0,0 @@
*** adpcm/Makefile.bak Fri Sep 1 14:58:19 1995
--- adpcm/Makefile Fri Oct 25 18:55:46 1996
***************
*** 1,7 ****
#
# Makefile for adpcm and test programs
# -------------------
! CFLAGS=-O -I..
# May need this on a sun:
#CFLAGS=-O -I/usr/demo/SOUND
--- 1,7 ----
#
# Makefile for adpcm and test programs
# -------------------
! CFLAGS+=-I..
# May need this on a sun:
#CFLAGS=-O -I/usr/demo/SOUND
*** des/Makefile.bak Thu Nov 2 22:38:58 1995
--- des/Makefile Fri Oct 25 18:55:46 1996
***************
*** 1,4 ****
! CFLAGS=-O
all: des.o
--- 1,4 ----
! #CFLAGS=-O
all: des.o
*** idea/Makefile.bak Wed Aug 2 22:39:19 1995
--- idea/Makefile Fri Oct 25 18:55:46 1996
***************
*** 6,13 ****
# Compiler flags
! CC = cc
! CFLAGS = -O
all: idea.o
--- 6,13 ----
# Compiler flags
! #CC = cc
! #CFLAGS = -O
all: idea.o
*** libdes/Makefile.bak Wed Apr 17 23:49:33 1996
--- libdes/Makefile Fri Oct 25 18:55:46 1996
***************
*** 30,37 ****
OPTS= $(OPTS0) $(OPTS1) $(OPTS2)
! CC=cc
! CFLAGS= -O $(OPTS) $(CFLAG)
#CC=gcc
#CFLAGS= -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)
--- 30,37 ----
OPTS= $(OPTS0) $(OPTS1) $(OPTS2)
! #CC=cc
! CFLAGS+= $(OPTS) $(CFLAG)
#CC=gcc
#CFLAGS= -O3 -fomit-frame-pointer $(OPTS) $(CFLAG)

View File

@ -1,113 +1,101 @@
*** soundbyte.c.orig Wed Mar 5 15:04:49 1997
--- soundbyte.c Wed Sep 9 19:21:21 1998
*** soundbyte.c.orig Fri Jan 15 23:13:23 1999
--- soundbyte.c Fri Jan 15 23:17:36 1999
***************
*** 15,21 ****
--- 15,23 ----
#ifdef Solaris
#include <sys/filio.h>
#else
+ #ifndef __FreeBSD__
#include <sys/dir.h>
+ #endif
#include <sys/file.h>
#endif
***************
*** 33,38 ****
--- 35,42 ----
*** 33,39 ****
#else /* FreeBSD / Linux */
#ifdef LINUX
#include <linux/soundcard.h>
+ #elif __OpenBSD__
+ #include <soundcard.h>
#else
! #else
#include <machine/soundcard.h>
#endif
#define AUDIO_MIN_GAIN 0
--- 33,41 ----
#else /* FreeBSD / Linux */
#ifdef LINUX
#include <linux/soundcard.h>
! #elif __OpenBSD__
! #include <soundcard.h>
! #else
#include <machine/soundcard.h>
#endif
#define AUDIO_MIN_GAIN 0
***************
*** 72,77 ****
--- 76,83 ----
static unsigned char *playbuf= NULL; /* Current play pointer */
static int squelch = 0; /* Squelch value */
*** 62,67 ****
--- 64,77 ----
#define MAX_GAIN 100
+ void soundplayvol();
+
/* Convert local gain into device parameters */
static unsigned scale_gain(g)
***************
*** 96,101 ****
--- 102,112 ----
}
#endif
+ #ifndef sun
+ #ifdef HALF_DUPLEX
+ static int oldvol = -1;
+ #endif
+ #endif
/* SOUNDINIT -- Open the sound peripheral and initialise for
access. Return TRUE if successful, FALSE
+
struct sound_buf {
struct sound_buf *snext; /* Next sound buffer */
int sblen; /* Length of this sound buffer */
***************
*** 145,150 ****
--- 156,176 ----
*** 157,162 ****
--- 167,187 ----
}
ioctl(Audio_fd, AUDIO_SETINFO, &Audio_info);
#endif
+ #ifndef sun
+ #ifdef HALF_DUPLEX
+ if (iomode == O_RDONLY) {
+ if (oldvol == -1)
+ oldvol = soundgetvol();
+ soundplayvol(0);
+ } else if ( iomode == O_WRONLY
+ && oldvol != -1
+ ) {
+ if (soundgetvol() == 0)
+ soundplayvol(oldvol);
+ oldvol = -1;
+ }
+ if (iomode == O_RDONLY) {
+ if (oldvol == -1)
+ oldvol = soundgetvol();
+ soundplayvol(0);
+ } else if ( iomode == O_WRONLY
+ && oldvol != -1
+ ) {
+ if (soundgetvol() == 0)
+ soundplayvol(oldvol);
+ oldvol = -1;
+ }
+ #endif
+ #endif
return TRUE;
}
if (errno != EINTR) {
***************
*** 160,165 ****
--- 186,200 ----
*** 172,177 ****
--- 197,211 ----
void soundterm()
{
if (audiof >= 0) {
+ #ifndef sun
+ #ifdef HALF_DUPLEX
+ if (oldvol != -1) {
+ if (soundgetvol() == 0)
+ soundplayvol(oldvol);
+ oldvol = -1;
+ }
+ if (oldvol != -1) {
+ if (soundgetvol() == 0)
+ soundplayvol(oldvol);
+ oldvol = -1;
+ }
+ #endif
+ #endif
if (close(audiof) < 0) {
perror("closing audio device");
perror("closing audio device");
}
***************
*** 210,219 ****
*** 222,231 ****
arg = (value << 8) | value;
! if (ioctl(Audio_fd, MIXER_WRITE(SOUND_MIXER_PCM), &arg) < 0)
! perror("SOUND_MIXER_PCM");
! perror("SOUND_MIXER_PCM");
#endif
}
/* SOUNDRECGAIN -- Set recording gain from 0 (minimum) to 100 (maximum). */
--- 245,274 ----
--- 256,285 ----
arg = (value << 8) | value;
! if (ioctl(Audio_fd, SOUND_MIXER_WRITE_PCM, &arg) < 0)
! perror("SOUND_MIXER_WRITE_PCM");
! perror("SOUND_MIXER_WRITE_PCM");
#endif
}
+

View File

@ -1,8 +1,8 @@
*** speakfree.h.orig Wed Sep 9 19:19:40 1998
--- speakfree.h Wed Sep 9 19:20:01 1998
*** speakfree.h.orig Fri Jan 15 23:12:44 1999
--- speakfree.h Fri Jan 15 23:13:02 1999
***************
*** 18,23 ****
--- 18,27 ----
*** 14,19 ****
--- 14,23 ----
#define BSD_like
#endif
@ -10,6 +10,6 @@
+ #define BSD_like
+ #endif
+
#ifdef sgi
#define _BSD_SIGNALS
#ifdef __FreeBSD__
#define BSD_like
#endif