[xiph-cvs] cvs commit: ao/src/plugins/macosx ao_macosx.c

Stan Seibert volsung at xiph.org
Wed Sep 26 12:23:54 PDT 2001



volsung     01/09/26 12:23:53

  Modified:    .        configure.in
               src/plugins/macosx ao_macosx.c
  Log:
  Compile fixes for MacOS X thanks to the MacOS X server on the SourceForge
  compile farm.

Revision  Changes    Path
1.35      +2 -2      ao/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ao/configure.in,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- configure.in	2001/09/26 17:03:03	1.34
+++ configure.in	2001/09/26 19:23:53	1.35
@@ -236,9 +236,9 @@
 dnl Check for MacOS X
 case $host in
        *-darwin*)
-               has_macosx=yes;;
+               have_macosx=yes;;
        *)
-               has_macosx=no;;
+               have_macosx=no;;
 esac
 AM_CONDITIONAL(HAVE_MACOSX,test "x$have_macosx" = xyes)
 

1.2       +10 -8     ao/src/plugins/macosx/ao_macosx.c

Index: ao_macosx.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/plugins/macosx/ao_macosx.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ao_macosx.c	2001/09/26 16:58:18	1.1
+++ ao_macosx.c	2001/09/26 19:23:53	1.2
@@ -46,6 +46,9 @@
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #endif
 
+#define true  1
+#define false 0
+
 static ao_info ao_macosx_info =
 {
         AO_TYPE_LIVE,
@@ -89,7 +92,7 @@
 } ao_macosx_internal;
 
 // The function that the CoreAudio thread calls when it wants more data
-static OSStatus audioDeviceIOProc(AudioDeviceID inDevice, const AudioTimeStamp *inNow, const void *inInputData, const AudioTimeStamp *inInputTime, void *outOutputData, const AudioTimeStamp *inOutputTime, void *inClientData);
+static OSStatus audioDeviceIOProc(AudioDeviceID inDevice, const AudioTimeStamp *inNow, const AudioBufferList *inInputData, const AudioTimeStamp *inInputTime, AudioBufferList *outOutputData, const AudioTimeStamp *inOutputTime, void *inClientData);
 
 int ao_plugin_test()
 {
@@ -141,12 +144,12 @@
     UInt32 propertySize;
     int rc;
     
-    if (rate != 44100) {
+    if (format->rate != 44100) {
         fprintf(stderr, "ao_macosx_open: Only support 44.1kHz right now\n");
         return 0;
     }
     
-    if (channels != 2) {
+    if (format->channels != 2) {
         fprintf(stderr, "ao_macosx_open: Only two channel audio right now\n");
         return 0;
     }
@@ -172,7 +175,7 @@
 
     fprintf(stderr, "hardware format...\n");
     fprintf(stderr, "%f mSampleRate\n", internal->outputStreamBasicDescription.mSampleRate);
-    fprintf(stderr, "%c%c%c%c mFormatID\n", (int)(s->outputStreamBasicDescription.mFormatID & 0xff000000) >> 24,
+    fprintf(stderr, "%c%c%c%c mFormatID\n", (int)(internal->outputStreamBasicDescription.mFormatID & 0xff000000) >> 24,
                                             (int)(internal->outputStreamBasicDescription.mFormatID & 0x00ff0000) >> 16,
                                             (int)(internal->outputStreamBasicDescription.mFormatID & 0x0000ff00) >>  8,
                                             (int)(internal->outputStreamBasicDescription.mFormatID & 0x000000ff) >>  0);
@@ -363,9 +366,9 @@
 }
 
 
-static OSStatus audioDeviceIOProc(AudioDeviceID inDevice, const AudioTimeStamp *inNow, const void *inInputData, const AudioTimeStamp *inInputTime, void *outOutputData, const AudioTimeStamp *inOutputTime, void *inClientData)
+static OSStatus audioDeviceIOProc(AudioDeviceID inDevice, const AudioTimeStamp *inNow, const AudioBufferList *inInputData, const AudioTimeStamp *inInputTime, AudioBufferList *outOutputData, const AudioTimeStamp *inOutputTime, void *inClientData)
 {
-    ao_macosx_internal *internal = (ao_macosx_internal *)inClientData;;
+    ao_macosx_internal *internal = (ao_macosx_internal *)inClientData;
     short *sample;
     unsigned int validByteCount;
     float scale = (0.5f / SHRT_MAX), *outBuffer;
@@ -409,12 +412,11 @@
         short x = *sample;
 #warning The bytes in the buffer are currently in little endian, but we need big endian.  Supposedly these are going to be host endian at some point and the following line of code can go away.
 /* They will go away now, I think. --- Stan */
-/*        x = ((x & 0xff00) >> 8) | ((x & 0x00ff) << 8);
+/*        x = ((x & 0xff00) >> 8) | ((x & 0x00ff) << 8); */
         *outBuffer = x * scale;
         outBuffer++;
         sample++;
     }
-*/
     
     pthread_cond_signal(&internal->condition);
     pthread_mutex_unlock(&internal->mutex);

--- >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