the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: libao2
Version: 0.8.5
Revision: 11
Source: http://www.xiph.org/ao/src/libao-%v.tar.gz
Source-MD5: dd72b66f5f29361411bda465470b65e2
Depends: %N-shlibs (= %v-%r), macosx
BuildDepends: fink (>= 0.9.9)
BuildDependsOnly: True
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %a/%n.patch | patch -p1
perl -pi.bak -e 's#/etc/#%p/etc/#g' src/ao_private.h
perl -pi -e 's/(AC_DEFUN\()([^[]+)(,)/\1\[\2]\3/' ao.m4
<<
ConfigureParams: --mandir=%p/share/man --disable-arts --disable-esd --disable-oss --disable-X
CompileScript: <<
./configure %c
make
<<
InstallScript: <<
make install mandir=%p/share/man DESTDIR=%d
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
<<
License: GPL
Maintainer: Ben Hines
Homepage: http://www.xiph.org/ao/
--- libao2-0.8.4/configure Fri Jan 16 16:58:56 2004
+++ libao2-0.8.4-patched/configure Fri Jan 16 21:16:51 2004
@@ -5873,7 +5873,7 @@
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
+ allow_undefined_flag='-undefined dynamic_lookup'
;;
esac
# FIXME: Relying on posixy $() will cause problems for
@@ -8081,9 +8081,10 @@
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
*-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"
+ LIBS="-Wl,-framework -Wl,CoreAudio"
+ PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
@@ -8184,7 +8184,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'
;;
--- libao2-0.8.4/src/plugins/macosx/ao_macosx.c Fri Jan 16 16:58:56 2004
+++ libao2-0.8.4-patched/src/plugins/macosx/ao_macosx.c Fri Jan 16 17:22:38 2004
@@ -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,
--- libao2-0.8.4/doc/Makefile.in Fri Jan 16 16:58:56 2004
+++ libao2-0.8.4-patched/doc/Makefile.in Fri Jan 16 18:45:29 2004
@@ -111,7 +111,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.
Package: libao2
Version: 0.8.5
Revision: 11
Source: http://www.xiph.org/ao/src/libao-%v.tar.gz
Source-MD5: dd72b66f5f29361411bda465470b65e2
Depends: %N-shlibs (= %v-%r), macosx
BuildDepends: fink (>= 0.9.9)
BuildDependsOnly: True
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %a/%n.patch | patch -p1
perl -pi.bak -e 's#/etc/#%p/etc/#g' src/ao_private.h
perl -pi -e 's/(AC_DEFUN\()([^[]+)(,)/\1\[\2]\3/' ao.m4
<<
ConfigureParams: --mandir=%p/share/man --disable-arts --disable-esd --disable-oss --disable-X
CompileScript: <<
./configure %c
make
<<
InstallScript: <<
make install mandir=%p/share/man DESTDIR=%d
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
<<
License: GPL
Maintainer: Ben Hines
Homepage: http://www.xiph.org/ao/
--- libao2-0.8.4/configure Fri Jan 16 16:58:56 2004
+++ libao2-0.8.4-patched/configure Fri Jan 16 21:16:51 2004
@@ -5873,7 +5873,7 @@
allow_undefined_flag='-undefined suppress'
;;
*) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
+ allow_undefined_flag='-undefined dynamic_lookup'
;;
esac
# FIXME: Relying on posixy $() will cause problems for
@@ -8081,9 +8081,10 @@
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
*-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"
+ LIBS="-Wl,-framework -Wl,CoreAudio"
+ PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
@@ -8184,7 +8184,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'
;;
--- libao2-0.8.4/src/plugins/macosx/ao_macosx.c Fri Jan 16 16:58:56 2004
+++ libao2-0.8.4-patched/src/plugins/macosx/ao_macosx.c Fri Jan 16 17:22:38 2004
@@ -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,
--- libao2-0.8.4/doc/Makefile.in Fri Jan 16 16:58:56 2004
+++ libao2-0.8.4-patched/doc/Makefile.in Fri Jan 16 18:45:29 2004
@@ -111,7 +111,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.