[57514] trunk/dports/audio/mpd

rmsfisher at macports.org rmsfisher at macports.org
Fri Sep 11 20:23:24 PDT 2009


Revision: 57514
          http://trac.macports.org/changeset/57514
Author:   rmsfisher at macports.org
Date:     2009-09-11 20:23:19 -0700 (Fri, 11 Sep 2009)
Log Message:
-----------
audio/mpd added patch for coreaudio syntax changes

Modified Paths:
--------------
    trunk/dports/audio/mpd/Portfile

Added Paths:
-----------
    trunk/dports/audio/mpd/files/patch-src-output-osx_plugin.c

Modified: trunk/dports/audio/mpd/Portfile
===================================================================
--- trunk/dports/audio/mpd/Portfile	2009-09-12 02:53:42 UTC (rev 57513)
+++ trunk/dports/audio/mpd/Portfile	2009-09-12 03:23:19 UTC (rev 57514)
@@ -53,6 +53,9 @@
 	configure.args-delete --enable-ao
 	depends_lib-delete    port:libao
 }
+platform darwin 10 {
+    patchfiles patch-src-output-osx_plugin.c 
+}
 startupitem.create  yes
 startupitem.start   "${prefix}/bin/mpd --no-daemon ${prefix}/etc/mpd.conf"
 startupitem.stop    "${prefix}/bin/mpd --kill"

Added: trunk/dports/audio/mpd/files/patch-src-output-osx_plugin.c
===================================================================
--- trunk/dports/audio/mpd/files/patch-src-output-osx_plugin.c	                        (rev 0)
+++ trunk/dports/audio/mpd/files/patch-src-output-osx_plugin.c	2009-09-12 03:23:19 UTC (rev 57514)
@@ -0,0 +1,71 @@
+--- src/output/osx_plugin.c.orig	2009-09-11 00:11:55.000000000 -0500
++++ src/output/osx_plugin.c	2009-09-11 22:02:46.000000000 -0500
+@@ -101,7 +101,7 @@
+ 
+ 	AudioOutputUnitStop(od->au);
+ 	AudioUnitUninitialize(od->au);
+-	CloseComponent(od->au);
++	AudioComponentInstanceDispose(od->au);
+ }
+ 
+ static OSStatus
+@@ -157,12 +157,12 @@
+ osx_output_open(void *data, struct audio_format *audio_format, GError **error)
+ {
+ 	struct osx_output *od = data;
+-	ComponentDescription desc;
+-	Component comp;
++	AudioComponentDescription desc;
++	AudioComponent comp;
+ 	AURenderCallbackStruct callback;
+ 	AudioStreamBasicDescription stream_description;
+ 	OSStatus status;
+-	ComponentResult result;
++	OSStatus result;
+ 
+ 	if (audio_format->bits > 16)
+ 		audio_format->bits = 16;
+@@ -173,14 +173,14 @@
+ 	desc.componentFlags = 0;
+ 	desc.componentFlagsMask = 0;
+ 
+-	comp = FindNextComponent(NULL, &desc);
++	comp = AudioComponentFindNext(NULL, &desc);
+ 	if (comp == 0) {
+ 		g_set_error(error, osx_output_quark(), 0,
+ 			    "Error finding OS X component");
+ 		return false;
+ 	}
+ 
+-	status = OpenAComponent(comp, &od->au);
++	status = AudioComponentInstanceNew(comp, &od->au);
+ 	if (status != noErr) {
+ 		g_set_error(error, osx_output_quark(), 0,
+ 			    "Unable to open OS X component: %s",
+@@ -190,7 +190,7 @@
+ 
+ 	status = AudioUnitInitialize(od->au);
+ 	if (status != noErr) {
+-		CloseComponent(od->au);
++		AudioComponentInstanceDispose(od->au);
+ 		g_set_error(error, osx_output_quark(), 0,
+ 			    "Unable to initialize OS X audio unit: %s",
+ 			    GetMacOSStatusCommentString(status));
+@@ -206,7 +206,7 @@
+ 				      &callback, sizeof(callback));
+ 	if (result != noErr) {
+ 		AudioUnitUninitialize(od->au);
+-		CloseComponent(od->au);
++		AudioComponentInstanceDispose(od->au);
+ 		g_set_error(error, osx_output_quark(), 0,
+ 			    "unable to set callback for OS X audio unit");
+ 		return false;
+@@ -232,7 +232,7 @@
+ 				      sizeof(stream_description));
+ 	if (result != noErr) {
+ 		AudioUnitUninitialize(od->au);
+-		CloseComponent(od->au);
++		AudioComponentInstanceDispose(od->au);
+ 		g_set_error(error, osx_output_quark(), 0,
+ 			    "Unable to set format on OS X device");
+ 		return false;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090911/09c74203/attachment.html>


More information about the macports-changes mailing list