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.
This commit is contained in:
Daniel Gibson 2012-08-28 00:42:50 +02:00
parent fa8f092e67
commit 1f25568762

View file

@ -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"