summaryrefslogtreecommitdiff
blob: d0ade8a794bdafc9e320caa846eac1d9599f1d9e (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
diff -uNr libao-0.8.5/configure libao-0.8.5-new/configure
--- libao-0.8.5/configure	Fri Mar 19 09:49:41 2004
+++ libao-0.8.5-new/configure	Fri Nov 12 16:01:29 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 +8185,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 -uNr libao-0.8.5/src/plugins/macosx/ao_macosx.c libao-0.8.5-new/src/plugins/macosx/ao_macosx.c
--- libao-0.8.5/src/plugins/macosx/ao_macosx.c	Tue Jun 24 07:15:00 2003
+++ libao-0.8.5-new/src/plugins/macosx/ao_macosx.c	Fri Nov 12 16:08:25 2004
@@ -173,6 +173,27 @@
 	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,