diff options
author | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2003-09-20 09:41:25 +0400 |
---|---|---|
committer | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2003-09-20 09:41:25 +0400 |
commit | 92457872efe7d98f375f357fecf29b0b21a372b9 (patch) | |
tree | 34c8f9e92097acdbd339a87d8e159f3b3d3df306 | |
parent | 6eba25b469f895de89859459aaa245e8ddad06db (diff) |
soundcard support for Solaris/*BSD, misc stuff for 1.0.2
git-svn-id: http://svn.xiph.org/branches/rel-1-0-branch/speex@5363 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | src/speexdec.1 | 4 | ||||
-rw-r--r-- | src/speexdec.c | 35 | ||||
-rw-r--r-- | src/speexenc.1 | 10 | ||||
-rw-r--r-- | src/speexenc.c | 6 |
5 files changed, 49 insertions, 14 deletions
diff --git a/configure.in b/configure.in index 77d6374..17734b3 100644 --- a/configure.in +++ b/configure.in @@ -4,11 +4,11 @@ AC_INIT(libspeex/speex.h) SPEEX_MAJOR_VERSION=1 SPEEX_MINOR_VERSION=0 -SPEEX_MICRO_VERSION=1 -SPEEX_VERSION=1.0.1 +SPEEX_MICRO_VERSION=2 +SPEEX_VERSION=1.0.2 SPEEX_LT_CURRENT=2 -SPEEX_LT_REVISION=0 +SPEEX_LT_REVISION=1 SPEEX_LT_AGE=1 AC_SUBST(SPEEX_LT_CURRENT) @@ -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 diff --git a/src/speexdec.1 b/src/speexdec.1 index d2e751f..d7806f3 100644 --- a/src/speexdec.1 +++ b/src/speexdec.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29. -.TH SPEEXDEC "1" "December 2002" "speexdec version 1.0" "User Commands" +.TH SPEEXDEC "1" "September 2003" "speexdec version 1.0.2" "User Commands" .SH NAME -speexdec \- manual page for speexdec version 1.0 +speexdec \- manual page for speexdec version 1.0.2 .SH SYNOPSIS .B speexdec [\fIoptions\fR] \fIinput_file.spx \fR[\fIoutput_file\fR] diff --git a/src/speexdec.c b/src/speexdec.c index 6b3c813..689ea41 100644 --- a/src/speexdec.c +++ b/src/speexdec.c @@ -56,6 +56,16 @@ #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> + +#elif defined HAVE_SYS_AUDIOIO_H +#include <sys/types.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/audioio.h> +#ifndef AUDIO_ENCODING_SLINEAR +#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR /* Solaris */ +#endif + #endif #include <string.h> @@ -167,6 +177,31 @@ FILE *out_file_open(char *outFile, int rate, int *channels) 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.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 { unsigned int speex_channels = *channels; diff --git a/src/speexenc.1 b/src/speexenc.1 index 70db688..115771e 100644 --- a/src/speexenc.1 +++ b/src/speexenc.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29. -.TH SPEEXENC "1" "December 2002" "speexenc version 1.0" "User Commands" +.TH SPEEXENC "1" "September 2003" "speexenc version 1.0.2" "User Commands" .SH NAME -speexenc \- manual page for speexenc version 1.0 +speexenc \- manual page for speexenc version 1.0.2 .SH SYNOPSIS .B speexenc [\fIoptions\fR] \fIinput_file output_file\fR @@ -60,13 +60,13 @@ Number of frames per Ogg packet (1-10), default 1 .TP \fB\-\-comment\fR Add the given string as an extra comment. This may be -used multiple times. +used multiple times .TP \fB\-\-author\fR -Author of this track. +Author of this track .TP \fB\-\-title\fR -Title for this track. +Title for this track .TP \fB\-h\fR, \fB\-\-help\fR This help diff --git a/src/speexenc.c b/src/speexenc.c index 24ce62b..971921d 100644 --- a/src/speexenc.c +++ b/src/speexenc.c @@ -176,9 +176,9 @@ void usage() printf (" --comp n Set encoding complexity (0-10), default 3\n"); printf (" --nframes n Number of frames per Ogg packet (1-10), default 1\n"); printf (" --comment Add the given string as an extra comment. This may be\n"); - printf (" used multiple times.\n"); - printf (" --author Author of this track.\n"); - printf (" --title Title for this track.\n"); + printf (" used multiple times\n"); + printf (" --author Author of this track\n"); + printf (" --title Title for this track\n"); printf (" -h, --help This help\n"); printf (" -v, --version Version information\n"); printf (" -V Verbose mode (show bit-rate)\n"); |