the Fink project is an effort to port
popular Unix programs to Mac OS X
# DISCLAIMER: Max Horn is the sole maintainer of this package.
# Please DO NOT MAKE MODIFICATIONS without informing the maintainer.
# Preferably, send a patch to me instead of making changes yourself!
# If that is not possible due to extra urgency, at least send me a mail.
#
# Explanation: I am sick and tired of getting back to my packages and
# discovering that people have messed with it. I am then forced to
# retrace their steps, find out who, when and why did make a certain
# change etc. -- i.e. it makes my life as maintainer harder.
# Furthermore, as maintainer I am responsible for problems caused by my
# packages. But I am not willing to take responsibility for something I
# did not do. In particular, for changes that other people introduced
# behind my back, no matter how good and noble their intentions were. As
# such, I may see myself forced to drop responsibility for (and hence,
# maintainership of) the affected package.
Package: libao2
Version: 0.8.8
Revision: 2
Maintainer: Max Horn
Depends: %N-shlibs (= %v-%r), macosx
Conflicts: libao4
Replaces: libao4
BuildDepends: pkgconfig (>= 0.21-1), fink (>= 0.24.12)
BuildDependsOnly: True
Source: http://downloads.xiph.org/releases/ao/libao-%v.tar.gz
Source-MD5: b92cba3cbcf1ee9bc221118a85d23dcd
PatchFile: %n.patch
PatchFile-MD5: 6c520d76c0f793e9045aee443d474277
SetCPPFLAGS: -DAO_SYSTEM_CONFIG='"%p/etc/libao.conf"'
ConfigureParams: <<
--mandir=%p/share/man \
--disable-dependency-tracking \
--disable-arts \
--disable-esd \
--disable-oss \
--disable-X
<<
InstallScript: <<
make install mandir=%p/share/man DESTDIR=%d
# Install a default config files
mkdir -p %i/etc
echo "default_driver=macosx" >> %i/etc/libao.conf
<<
ConfFiles: %p/etc/libao.conf
DocFiles: README COPYING AUTHORS
SplitOff: <<
Package: %N-shlibs
Files: lib/libao.*.dylib lib/ao/plugins-2/*.so
Shlibs: %p/lib/libao.2.dylib 4.0.0 %n (>= 0.8.3-1)
DocFiles: README COPYING AUTHORS
<<
Description: Audio output library
DescDetail: <<
libao is a way to easily add cross-platform audio output to your program.
Output devices are implemented as dynamic plugins. The Fink package
only builds the macosx plugin.
<<
DescPort: <<
- Uses patch to change documentation location.
- Patch to fix multi-channel output
- Patch to fix plugin linkage and dlopening
- Patch to remove _dlsym_auto_underscore, which could cause link issues
for external code using libao2.
<<
DescPackaging: <<
Originally packaged by Ben Hines
<<
Homepage: http://www.xiph.org/ao/
License: GPL
diff -ru libao-0.8.8/configure libao-0.8.8-patched/configure
--- libao-0.8.8/configure 2007-05-24 12:51:52.000000000 +0200
+++ libao-0.8.8-patched/configure 2010-03-27 13:24:36.000000000 +0100
@@ -20094,9 +20094,9 @@
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char" ;;
*-darwin*)
PLUGIN_LDFLAGS="-module -avoid-version"
- DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -Ddlsym=dlsym_auto_underscore"
- CFLAGS="-D__NO_MATH_INLINES -fsigned-char -Ddlsym=dlsym_auto_underscore"
- PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char -Ddlsym=dlsym_auto_underscore" ;;
+ DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
+ CFLAGS="-D__NO_MATH_INLINES -fsigned-char"
+ PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
@@ -20203,7 +20204,7 @@
DLOPEN_FLAG='(RTLD_LAZY)'
SHARED_LIB_EXT='.sl'
;;
- *openbsd* | *netbsd* | *solaris2.7)
+ *darwin* | *openbsd* | *netbsd* | *solaris2.7)
DLOPEN_FLAG='(RTLD_LAZY)'
SHARED_LIB_EXT='.so'
;;
diff -ru libao-0.8.8/doc/Makefile.in libao-0.8.8-patched/doc/Makefile.in
--- libao-0.8.8/doc/Makefile.in 2007-05-24 12:51:43.000000000 +0200
+++ libao-0.8.8-patched/doc/Makefile.in 2010-03-27 13:25:24.000000000 +0100
@@ -161,7 +161,7 @@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
+docdir = $(datadir)/doc/$(PACKAGE)
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
diff -ru libao-0.8.8/src/plugins/macosx/ao_macosx.c libao-0.8.8-patched/src/plugins/macosx/ao_macosx.c
--- libao-0.8.8/src/plugins/macosx/ao_macosx.c 2007-05-24 11:19:07.000000000 +0200
+++ libao-0.8.8-patched/src/plugins/macosx/ao_macosx.c 2010-03-27 13:24:36.000000000 +0100
@@ -173,6 +173,26 @@
return 0;
}
+ if (internal->outputStreamBasicDescription.mChannelsPerFrame != format->channels)
+ {
+ internal->outputStreamBasicDescription.mChannelsPerFrame = format->channels;
+ internal->outputStreamBasicDescription.mBytesPerFrame =
+ internal->outputStreamBasicDescription.mChannelsPerFrame * sizeof (float);
+ internal->outputStreamBasicDescription.mBytesPerPacket =
+ internal->outputStreamBasicDescription.mBytesPerFrame *
+ internal->outputStreamBasicDescription.mFramesPerPacket;
+ status = AudioDeviceSetProperty(internal->outputDeviceID, 0, 0, 0,
+ kAudioDevicePropertyStreamFormat,
+ sizeof (internal->outputStreamBasicDescription),
+ &internal->outputStreamBasicDescription);
+ if (status != noErr)
+ {
+ fprintf(stderr, "ao_macosx_open: AudioDeviceSetProperty returned %.*s when setting kAudioDevicePropertyStreamFormat\n",
+ (int) sizeof (status), (char *) &status);
+ return 0;
+ }
+ }
+
fprintf(stderr, "hardware format...\n");
fprintf(stderr, "%f mSampleRate\n", internal->outputStreamBasicDescription.mSampleRate);
fprintf(stderr, "%c%c%c%c mFormatID\n", (int)(internal->outputStreamBasicDescription.mFormatID & 0xff000000) >> 24,