# macosx compile fix

(OpenAL ALC string definition differs on Windows vs OSX)

This was SVN commit r7000.
This commit is contained in:
janwas
2009-07-16 16:48:06 +00:00
parent fcf9db0d53
commit 663fcfeb9a
2 changed files with 11 additions and 3 deletions
+8
View File
@@ -30,6 +30,14 @@
# include <AL/alc.h>
#endif
// ALC strings (e.g. device and extension names) are typed differently
// between platforms *sigh*
#if OS_MACOSX
typedef ALCubyte* alcString;
#else
typedef ALCchar* alcString;
#endif
#if MSC_VERSION
# pragma comment(lib, "openal32.lib")
#endif
+3 -3
View File
@@ -248,7 +248,7 @@ static LibError alc_init()
#if OS_WIN
__try
{
alc_dev = alcOpenDevice((ALCchar*)alc_dev_name);
alc_dev = alcOpenDevice((alcString)alc_dev_name);
}
// if invalid handle, handle it; otherwise, continue handler search.
__except(GetExceptionCode() == EXCEPTION_INVALID_HANDLE)
@@ -256,7 +256,7 @@ static LibError alc_init()
// ignore
}
#else
alc_dev = alcOpenDevice(alc_dev_name);
alc_dev = alcOpenDevice((alcString)alc_dev_name);
#endif
if(alc_dev)
@@ -686,7 +686,7 @@ static const char* devs;
*/
LibError snd_dev_prepare_enum()
{
if(alcIsExtensionPresent(0, (ALCchar*)"ALC_ENUMERATION_EXT") != AL_TRUE)
if(alcIsExtensionPresent(0, (alcString)"ALC_ENUMERATION_EXT") != AL_TRUE)
WARN_RETURN(ERR::NO_SYS);
devs = (const char*)alcGetString(0, ALC_DEVICE_SPECIFIER);