[xiph-cvs] cvs commit: speex/src speexdec.c

Jean-Marc Valin jm at xiph.org
Wed Jun 11 21:30:04 PDT 2003



jm          03/06/12 00:30:04

  Modified:    .        TODO configure.in
               src      speexdec.c
  Log:
  sound output for *BSD and Solaris

Revision  Changes    Path
1.19      +3 -3      speex/TODO

Index: TODO
===================================================================
RCS file: /usr/local/cvsroot/speex/TODO,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- TODO	20 Dec 2002 05:20:28 -0000	1.18
+++ TODO	12 Jun 2003 04:30:04 -0000	1.19
@@ -1,16 +1,16 @@
 Features
 -Add maximum/minimum bit-rate control for VBR
 -Get the encoder to use the rate of packet loss (more conservative pitch gains)
+-Implement "packet terminator" with no overhead
+-Improve error handling (with perror-like call?)
 
 Long-term quality improvements
 -Improve perceptual enhancement (including wideband)
 
 Standards
-*Complete Speex RTP profile
+-Complete Speex RTP profile
 -MIME type registration
 -MS ACM wrapper
-
-*required for 1.0
 
 ideas:
 Peelable stream (double codebook, higher bands, stereo)

<p><p>1.53      +1 -1      speex/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/speex/configure.in,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- configure.in	13 May 2003 20:57:30 -0000	1.52
+++ configure.in	12 Jun 2003 04:30:04 -0000	1.53
@@ -26,7 +26,7 @@
 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

<p><p>1.78      +35 -0     speex/src/speexdec.c

Index: speexdec.c
===================================================================
RCS file: /usr/local/cvsroot/speex/src/speexdec.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- speexdec.c	1 Jun 2003 05:58:41 -0000	1.77
+++ speexdec.c	12 Jun 2003 04:30:04 -0000	1.78
@@ -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>
@@ -164,6 +174,31 @@
       {
          perror("SNDCTL_DSP_SPEED");
          close(audio_fd);
+         exit(1);
+      }
+      fout = fdopen(audio_fd, "w");
+#elif defined HAVE_SYS_AUDIOIO_H
+      audio_info_t info;
+      int audio_df;
+      
+      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");

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list