1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff -uNr libao-0.8.6/configure libao-0.8.6-new/configure
--- libao-0.8.6/configure Tue Jan 11 16:08:26 2005
+++ libao-0.8.6-new/configure Sat Jan 29 17:23:03 2005
@@ -19227,6 +19227,10 @@
DLOPEN_FLAG='(RTLD_LAZY)'
SHARED_LIB_EXT='.so'
;;
+ *darwin*)
+ DLOPEN_FLAG='(RTLD_LAZY)'
+ SHARED_LIB_EXT='.dylib'
+ ;;
*)
DLOPEN_FLAG='(RTLD_NOW | RTLD_GLOBAL)'
SHARED_LIB_EXT='.so'
diff -uNr libao-0.8.6/src/plugins/macosx/ao_macosx.c libao-0.8.6-new/src/plugins/macosx/ao_macosx.c
--- libao-0.8.6/src/plugins/macosx/ao_macosx.c Tue Nov 9 02:20:26 2004
+++ libao-0.8.6-new/src/plugins/macosx/ao_macosx.c Sat Jan 29 17:26:09 2005
@@ -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,
|