From 86ebfe6e39b2e41fcd8c5a15891cb220bbd899c7 Mon Sep 17 00:00:00 2001 From: pho Date: Fri, 10 Jan 2014 08:58:01 +0000 Subject: Fix build on Darwin. --- audio/openal/distinfo | 3 +- .../patch-src_backends_alc__backend__darwin.c | 51 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 audio/openal/patches/patch-src_backends_alc__backend__darwin.c (limited to 'audio/openal') diff --git a/audio/openal/distinfo b/audio/openal/distinfo index e52c21062b1..76967e392ee 100644 --- a/audio/openal/distinfo +++ b/audio/openal/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.15 2013/12/15 20:33:47 asau Exp $ +$NetBSD: distinfo,v 1.16 2014/01/10 08:58:01 pho Exp $ SHA1 (openal-0.0.8.tar.gz) = 31aaedc18bd26759bd51f4fa495bc4ccb08acb3e RMD160 (openal-0.0.8.tar.gz) = 29368dbceea7cfd8b5c520b9e0f0cfdc7324e265 @@ -10,3 +10,4 @@ SHA1 (patch-ad) = c740552ebcb4f846faa7ac17140753a6aac4393c SHA1 (patch-ae) = 590a40890ccfe488248ef9d58c8991c07f0422d7 SHA1 (patch-common_include_AL_alc.h) = 22ee2edf133c5691487fc8628d3ef25d871dcb0d SHA1 (patch-src_arch_i386_x86__floatmul.c) = 302581fa21ef94bb9f9e34df68e14601eaa1b5e1 +SHA1 (patch-src_backends_alc__backend__darwin.c) = f1ae045dd05e35f76cebaec2e47949a6e507fe4f diff --git a/audio/openal/patches/patch-src_backends_alc__backend__darwin.c b/audio/openal/patches/patch-src_backends_alc__backend__darwin.c new file mode 100644 index 00000000000..e0ff9cf1fa9 --- /dev/null +++ b/audio/openal/patches/patch-src_backends_alc__backend__darwin.c @@ -0,0 +1,51 @@ +$NetBSD: patch-src_backends_alc__backend__darwin.c,v 1.1 2014/01/10 08:58:01 pho Exp $ + +Convert C++ style comments to C style ones to fix build on Darwin. + +--- src/backends/alc_backend_darwin.c.orig 2014-01-10 08:52:31.000000000 +0000 ++++ src/backends/alc_backend_darwin.c +@@ -112,19 +112,19 @@ OSStatus GetAudioDevices (void **devices + + DebugPrintf("OpenAL MOSX Backend : Build %d\n",buildID); + +- // find out how many audio devices there are, if any ++ /* find out how many audio devices there are, if any */ + err = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &outSize, &outWritable); + if (err != NULL) return (err); + +- // calculate the number of device available ++ /* calculate the number of device available */ + *devicesAvailable = outSize / sizeof(AudioDeviceID); +- // Bail if there aren't any devices ++ /* Bail if there aren't any devices */ + if (*devicesAvailable < 1) return (-1); + +- // make space for the devices we are about to get ++ /* make space for the devices we are about to get */ + if (*devices != NULL) free(*devices); + *devices = malloc(outSize); +- // get an array of AudioDeviceIDs ++ /* get an array of AudioDeviceIDs */ + err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &outSize, (void *) *devices); + if (err != NULL) free(*devices); + #ifdef DEBUG_MAXIMUS +@@ -259,8 +259,8 @@ static ALboolean set_write_native(UNUSED + + DebugPrintf("Init Speed : %d\n",*speed); + +- //*fmt = AL_FORMAT_STEREO16; +- //*speed = (unsigned int)libGlobals.deviceFormat.mSampleRate; ++ /* *fmt = AL_FORMAT_STEREO16; */ ++ /* *speed = (unsigned int)libGlobals.deviceFormat.mSampleRate; */ + + alWriteFormat = *fmt; + +@@ -324,7 +324,7 @@ void native_blitbuffer(void *handle, vo + return; + } + +- // Gyom FIXME: Is this useful? ++ /* Gyom FIXME: Is this useful? */ + assert(nativePreferedBuffSize <= bytes); + + playABuffer(data); -- cgit v1.2.3