changeset 12788:a6ff4398e4e6

enables resampling of audio in ao_macosx by Dan Christiansen
author nplourde
date Sat, 10 Jul 2004 00:23:19 +0000
parents 7aa852ffba45
children fba0bd4fe79e
files libao2/ao_macosx.c
diffstat 1 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_macosx.c	Fri Jul 09 18:59:55 2004 +0000
+++ b/libao2/ao_macosx.c	Sat Jul 10 00:23:19 2004 +0000
@@ -64,7 +64,7 @@
 
 /* This is large, but best (maybe it should be even larger).
  * CoreAudio supposedly has an internal latency in the order of 2ms */
-#define NUM_BUFS 128
+#define NUM_BUFS 16
 
 typedef struct ao_macosx_s
 {
@@ -243,19 +243,7 @@
     }
     ao_msg(MSGT_AO,MSGL_V, "%5d ao->buffer_len\n", (int)ao->buffer_len);
 
-    /* FIXME:
-     *
-     * Resampling of 32-bit float audio is broken in MPlayer. Refuse to 
-     * handle anything other than the native format until this is fixed
-     * or this module is rewritten, whichever comes first.
-     */
-    if (ao_data.samplerate == ao->outputStreamBasicDescription.mSampleRate) {
-      ao_data.samplerate = (int)ao->outputStreamBasicDescription.mSampleRate;
-    } else {
-      ao_msg(MSGT_AO,MSGL_WARN, "Resampling not supported yet.\n");
-      return 0;
-    }
-
+    ao_data.samplerate = ao->outputStreamBasicDescription.mSampleRate;
     ao_data.channels = ao->outputStreamBasicDescription.mChannelsPerFrame;
     ao_data.outburst = ao_data.buffersize = ao->buffer_len;
     ao_data.bps =