Import speex 1.0.1.

Speex is a patent-free audio codec designed especially for voice
(unlike Vorbis which targets general audio) signals and providing
good narrowband and wideband quality.  This project aims to be
complementary to the Vorbis codec.
This commit is contained in:
naddy 2003-06-12 00:52:02 +00:00
parent d6f7d0a265
commit 66893e37ac
8 changed files with 131 additions and 0 deletions

29
audio/speex/Makefile Normal file
View File

@ -0,0 +1,29 @@
# $OpenBSD: Makefile,v 1.1.1.1 2003/06/12 00:52:02 naddy Exp $
COMMENT= "patent-free speech codec"
DISTNAME= speex-1.0.1
CATEGORIES= audio
HOMEPAGE= http://www.speex.org/
MAINTAINER= Christian Weisgerber <naddy@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}download/
LIB_DEPENDS= ogg.4::audio/libogg
CONFIGURE_STYLE= autoconf
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--with-ogg-dir=${LOCALBASE}
FAKE_FLAGS= ${DESTDIRNAME}=${WRKINST} \
docdir=${PREFIX}/share/doc/speex \
mandir=${PREFIX}/man
.include <bsd.port.mk>

3
audio/speex/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (speex-1.0.1.tar.gz) = 20515626d2c755ca9216701b60c97120
RMD160 (speex-1.0.1.tar.gz) = 5faedd3bf35be5cc11dcd80792d52e3ee18b904b
SHA1 (speex-1.0.1.tar.gz) = 6a2d3542f7c1eb201e4b2dea190d548c41d0d202

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2003/06/12 00:52:02 naddy Exp $
--- configure.in.orig Tue May 13 00:58:07 2003
+++ configure.in Tue May 13 00:58:20 2003
@@ -26,7 +26,7 @@ AC_CANONICAL_HOST
AM_PROG_LIBTOOL
AC_C_BIGENDIAN
-AC_CHECK_HEADERS(sys/soundcard.h)
+AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
AC_ARG_ENABLE(ogg,
[ --enable-ogg=[yes/no] Turn on or off the use of ogg

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libspeex_stack_alloc_h,v 1.1.1.1 2003/06/12 00:52:02 naddy Exp $
--- libspeex/stack_alloc.h.orig Tue May 13 04:15:23 2003
+++ libspeex/stack_alloc.h Tue May 13 04:15:39 2003
@@ -48,7 +48,7 @@
#else
/*Aligns the stack to a 'size' boundary */
-#define ALIGN(stack, size) ((stack) += ((size) - (int)(stack)) & ((size) - 1))
+#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
/* Allocates 'size' elements of type 'type' on the stack */
#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-src_speexdec_c,v 1.1.1.1 2003/06/12 00:52:02 naddy Exp $
--- src/speexdec.c.orig Thu Jun 12 01:11:28 2003
+++ src/speexdec.c Thu Jun 12 01:14:31 2003
@@ -56,6 +56,14 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
+#elif defined HAVE_SYS_AUDIOIO_H
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/audioio.h>
+#include <fcntl.h>
+#ifndef AUDIO_ENCODING_SLINEAR
+#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR /* Solaris */
+#endif
#endif
#include <string.h>
@@ -166,6 +174,32 @@ FILE *out_file_open(char *outFile, int r
close(audio_fd);
exit(1);
}
+ fout = fdopen(audio_fd, "w");
+#elif defined HAVE_SYS_AUDIOIO_H
+ audio_info_t info;
+ int audio_fd;
+
+ audio_fd = open("/dev/audio", O_WRONLY);
+ if (audio_fd<0)
+ {
+ perror("Cannot open /dev/audio");
+ exit(1);
+ }
+
+ AUDIO_INITINFO(&info);
+#ifdef AUMODE_PLAY /* NetBSD/OpenBSD */
+ info.mode = AUMODE_PLAY;
+#endif
+ info.play.encoding = AUDIO_ENCODING_SLINEAR;
+ info.play.precision = 16;
+ info.play.sample_rate = rate;
+ info.play.channels = *channels;
+
+ if (ioctl(audio_fd, AUDIO_SETINFO, &info) < 0)
+ {
+ perror("AUDIO_SETINFO");
+ exit(1);
+ }
fout = fdopen(audio_fd, "w");
#elif defined WIN32 || defined _WIN32
{

6
audio/speex/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
Speex is a patent-free audio codec designed especially for voice
(unlike Vorbis which targets general audio) signals and providing
good narrowband and wideband quality. This project aims to be
complementary to the Vorbis codec.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2003/06/12 00:52:02 naddy Exp $
lib/libspeex.so.2.0
DYNLIBDIR(%B)

15
audio/speex/pkg/PLIST Normal file
View File

@ -0,0 +1,15 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/06/12 00:52:02 naddy Exp $
bin/speexdec
bin/speexenc
include/speex.h
include/speex_bits.h
include/speex_callbacks.h
include/speex_header.h
include/speex_stereo.h
lib/libspeex.a
lib/libspeex.la
man/man1/speexdec.1
man/man1/speexenc.1
share/doc/speex/manual.pdf
%%SHARED%%
@dirrm share/doc/speex