From 67822720f420a291163c1d31bc8a5b113dd5bc89 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Tue, 28 Aug 2012 00:42:50 +0200 Subject: [PATCH] Remove duplicate functions from openal_stub.cpp + extern C Some functions were duplicated, the only difference was a const in one parameter. The definitions in the header were with const, so I kept those versions. Also, the functions in the header are pure C, so add extern "C", this fixes issues with MSVC and the formerly duplicated functions. --- neo/sys/stub/openal_stub.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/neo/sys/stub/openal_stub.cpp b/neo/sys/stub/openal_stub.cpp index 939acba0..09578903 100644 --- a/neo/sys/stub/openal_stub.cpp +++ b/neo/sys/stub/openal_stub.cpp @@ -30,6 +30,8 @@ If you have questions concerning this license or the applicable additional terms #include "sound/snd_local.h" +extern "C" { + AL_API ALenum AL_APIENTRY alGetError() { return AL_NO_ERROR; } @@ -91,18 +93,6 @@ ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *deviceHandle, ALCe return NULL; } -AL_API void AL_APIENTRY alBufferData( ALuint buffer, - ALenum format, - ALvoid* data, - ALsizei size, - ALsizei freq ) { } - -AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, ALuint* buffers ) { } - -AL_API ALboolean AL_APIENTRY alIsExtensionPresent( ALubyte* fname ) { - return AL_FALSE; -} - AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources ) { } AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename ) { @@ -118,10 +108,6 @@ ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *dev, return NULL; } -ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( ALubyte *tokstr ) { - return NULL; -} - AL_API void AL_APIENTRY alListenerfv( ALenum pname, const ALfloat* param ) { } AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids ) { } @@ -146,3 +132,5 @@ AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ) { } AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids ) { } AL_API void AL_APIENTRY alSourcePlay( ALuint sid ) { } + +} // extern "C"