diff -uNr libao-0.8.3/configure libao-0.8.3-new/configure --- libao-0.8.3/configure Fri Jul 19 10:16:55 2002 +++ libao-0.8.3-new/configure Mon Oct 6 14:25:15 2003 @@ -3479,7 +3479,7 @@ # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. Also zsh mangles # `"' quotes if we put them in here... so don't! - archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' + archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring) -framework CoreAudio' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes @@ -5429,8 +5429,12 @@ *-darwin*) SILLY_CARBON_PATH="-I/System/Library/Frameworks/Carbon.framework/Versions/A/Headers" DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char $SILLY_CARBON_PATH" - CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char $SILLY_CARBON_PATH" - PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char $SILLY_CARBON_PATH" ;; + CFLAGS="-D__NO_MATH_INLINES -fsigned-char -framework CoreAudio" + if [ `nm /usr/lib/libSystem.dylib | grep -c dlopen` -eq 0 ]; then + CFLAGS="$CFLAGS -Ddlsym=dlsym_auto_underscore" + fi + LDFLAGS="-framework CoreAudio" + PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char -framework CoreAudio " ;; *) DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char" diff -uNr libao-0.8.3/doc/Makefile.am libao-0.8.3-new/doc/Makefile.am --- libao-0.8.3/doc/Makefile.am Tue Nov 20 23:53:11 2001 +++ libao-0.8.3-new/doc/Makefile.am Mon Oct 6 14:23:46 2003 @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign -docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) +docdir = $(datadir)/doc/$(PACKAGE) # We list all of these as opposed to using a wildcard so that # building outside the source directory works. diff -uNr libao-0.8.3/doc/Makefile.in libao-0.8.3-new/doc/Makefile.in --- libao-0.8.3/doc/Makefile.in Fri Jul 19 10:17:55 2002 +++ libao-0.8.3-new/doc/Makefile.in Mon Oct 6 14:23:46 2003 @@ -93,7 +93,7 @@ AUTOMAKE_OPTIONS = foreign -docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) +docdir = $(datadir)/doc/$(PACKAGE) # We list all of these as opposed to using a wildcard so that # building outside the source directory works. diff -uNr libao-0.8.3/src/plugins/arts/Makefile.in libao-0.8.3-new/src/plugins/arts/Makefile.in --- libao-0.8.3/src/plugins/arts/Makefile.in Fri Jul 19 10:17:48 2002 +++ libao-0.8.3-new/src/plugins/arts/Makefile.in Mon Oct 6 14:23:47 2003 @@ -94,7 +94,7 @@ @HAVE_ARTS_TRUE@artsltlibs = libarts.la @HAVE_ARTS_FALSE@artsltlibs = -@HAVE_ARTS_TRUE@artsldflags = -export-dynamic -avoid-version +@HAVE_ARTS_TRUE@artsldflags = -module -avoid-version @HAVE_ARTS_FALSE@artsldflags = @HAVE_ARTS_TRUE@artssources = ao_arts.c @HAVE_ARTS_FALSE@artssources = diff -uNr libao-0.8.3/src/plugins/esd/Makefile.in libao-0.8.3-new/src/plugins/esd/Makefile.in --- libao-0.8.3/src/plugins/esd/Makefile.in Fri Jul 19 10:17:47 2002 +++ libao-0.8.3-new/src/plugins/esd/Makefile.in Mon Oct 6 14:23:47 2003 @@ -94,7 +94,7 @@ @HAVE_ESD_TRUE@esdltlibs = libesd.la @HAVE_ESD_FALSE@esdltlibs = -@HAVE_ESD_TRUE@esdldflags = -export-dynamic -avoid-version +@HAVE_ESD_TRUE@esdldflags = -module -avoid-version @HAVE_ESD_FALSE@esdldflags = @HAVE_ESD_TRUE@esdsources = ao_esd.c @HAVE_ESD_FALSE@esdsources = diff -uNr libao-0.8.3/src/plugins/macosx/Makefile.in libao-0.8.3-new/src/plugins/macosx/Makefile.in --- libao-0.8.3/src/plugins/macosx/Makefile.in Fri Jul 19 10:17:52 2002 +++ libao-0.8.3-new/src/plugins/macosx/Makefile.in Mon Oct 6 14:23:46 2003 @@ -94,7 +94,7 @@ @HAVE_MACOSX_TRUE@macosxltlibs = libmacosx.la @HAVE_MACOSX_FALSE@macosxltlibs = -@HAVE_MACOSX_TRUE@macosxldflags = -export-dynamic -avoid-version +@HAVE_MACOSX_TRUE@macosxldflags = -module -avoid-version @HAVE_MACOSX_FALSE@macosxldflags = @HAVE_MACOSX_TRUE@macosxsources = ao_macosx.c @HAVE_MACOSX_FALSE@macosxsources = diff -uNr libao-0.8.3/src/plugins/macosx/ao_macosx.c libao-0.8.3-new/src/plugins/macosx/ao_macosx.c --- libao-0.8.3/src/plugins/macosx/ao_macosx.c Thu Oct 25 05:44:01 2001 +++ libao-0.8.3-new/src/plugins/macosx/ao_macosx.c Mon Oct 6 14:23:47 2003 @@ -190,6 +190,10 @@ } propertySize = sizeof(internal->outputBufferByteCount); + + internal->outputBufferByteCount = 8192; + status = AudioDeviceSetProperty(internal->outputDeviceID, 0, 0, false, kAudioDevicePropertyBufferSize, propertySize, &internal->outputBufferByteCount); + status = AudioDeviceGetProperty(internal->outputDeviceID, 0, false, kAudioDevicePropertyBufferSize, &propertySize, &internal->outputBufferByteCount); if (status) { fprintf(stderr, "ao_macosx_open: AudioDeviceGetProperty returned %d when getting kAudioDevicePropertyBufferSize\n", (int)status); @@ -200,7 +204,7 @@ // It appears that AudioDeviceGetProperty lies about this property in DP4 // Set the actual value - internal->outputBufferByteCount = 32768; + // internal->outputBufferByteCount = 32768; // Set the IO proc that CoreAudio will call when it needs data, but don't start // the stream yet. @@ -301,7 +305,7 @@ internal->bytesQueued += bytesToCopy; - //fprintf(stderr, "Copy: %d bytes, %d bytes left\n", bytesToCopy, internal->availableByteCount); + // fprintf(stderr, "Copy: %d bytes, %d bytes left\n", bytesToCopy, internal->availableByteCount); pthread_mutex_unlock(&internal->mutex); // We have to wait to start the device until we have some data queued. @@ -383,9 +387,9 @@ // Find the first valid frame and the number of valid frames pthread_mutex_lock(&internal->mutex); - bytesToCopy = internal->outputBufferByteCount; + bytesToCopy = internal->outputBufferByteCount/2; validByteCount = internal->validByteCount; - outBuffer = (float *)outOutputData; + outBuffer = (float *)outOutputData->mBuffers[0].mData; if (validByteCount < bytesToCopy && !internal->isStopping) { // Not enough data ... let it build up a bit more before we start copying stuff over. @@ -424,8 +428,8 @@ sample++; } - pthread_cond_signal(&internal->condition); pthread_mutex_unlock(&internal->mutex); + pthread_cond_signal(&internal->condition); return 0; }