From eb5073a8a763ecf69f5e662a4813465a4b6f8c0b Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 7 Dec 2012 18:43:13 -0800 Subject: Properly convert uint values when getting them as int64 --- OpenAL32/alSource.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 480e77fe..5dbea314 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -1177,7 +1177,6 @@ static ALenum GetSourcei64v(const ALsource *Source, ALCcontext *Context, SrcIntP case AL_SOURCE_RELATIVE: case AL_LOOPING: - case AL_BUFFER: case AL_SOURCE_STATE: case AL_BUFFERS_QUEUED: case AL_BUFFERS_PROCESSED: @@ -1187,10 +1186,23 @@ static ALenum GetSourcei64v(const ALsource *Source, ALCcontext *Context, SrcIntP case AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO: case AL_DIRECT_CHANNELS_SOFT: case AL_DISTANCE_MODEL: + if((err=GetSourceiv(Source, Context, (int)prop, ivals)) == AL_NO_ERROR) + *values = ivals[0]; + return err; + + case siBuffer: case siDirectFilter: + if((err=GetSourceiv(Source, Context, (int)prop, ivals)) == AL_NO_ERROR) + *values = ((ALuint*)ivals)[0]; + return err; + case siAuxSendFilter: if((err=GetSourceiv(Source, Context, (int)prop, ivals)) == AL_NO_ERROR) - *values = ivals[0]; + { + values[0] = ((ALuint*)ivals)[0]; + values[1] = ((ALuint*)ivals)[1]; + values[2] = ((ALuint*)ivals)[2]; + } return err; } -- cgit v1.2.3