[GB.OPENAL]

* BUG: Fix return value of Al.GetBufferi(), Al.GetSourcei() and 
  Al.GetListeneri().


git-svn-id: svn://localhost/gambas/trunk@7428 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-10-21 20:25:44 +00:00
parent 5a3264a97d
commit 5f9e87da54
2 changed files with 30 additions and 32 deletions

View file

@ -374,7 +374,7 @@ IMPLEMENT_XV(Listeneriv, GB_INTEGER)
IMPLEMENT_GET_X(GetListenerf, Single, ALfloat)
IMPLEMENT_GET_XV(GetListenerfv, GB_T_SINGLE, get_listener_float_param_size)
IMPLEMENT_GET_X(GetListeneri, Single, ALint)
IMPLEMENT_GET_X(GetListeneri, Integer, ALint)
IMPLEMENT_GET_XV(GetListeneriv, GB_T_INTEGER, get_listener_integer_param_size)
#undef ID_PARAM
@ -391,7 +391,7 @@ IMPLEMENT_XV(Sourceiv, GB_INTEGER)
IMPLEMENT_GET_X(GetSourcef, Single, ALfloat)
IMPLEMENT_GET_XV(GetSourcefv, GB_T_SINGLE, get_source_float_param_size)
IMPLEMENT_GET_X(GetSourcei, Single, ALint)
IMPLEMENT_GET_X(GetSourcei, Integer, ALint)
IMPLEMENT_GET_XV(GetSourceiv, GB_T_INTEGER, get_source_integer_param_size)
#define IMPLEMENT_ACTION(_name) \
@ -501,7 +501,7 @@ IMPLEMENT_XV(Bufferiv, GB_INTEGER)
IMPLEMENT_GET_X(GetBufferf, Single, ALfloat)
IMPLEMENT_GET_XV(GetBufferfv, GB_T_SINGLE, get_buffer_float_param_size)
IMPLEMENT_GET_X(GetBufferi, Single, ALint)
IMPLEMENT_GET_X(GetBufferi, Integer, ALint)
IMPLEMENT_GET_XV(GetBufferiv, GB_T_INTEGER, get_buffer_integer_param_size)

View file

@ -203,7 +203,6 @@ BEGIN_METHOD(Alure_CreateBufferFromFile, GB_STRING path)
GB.ReleaseFile(addr, len);
END_METHOD
BEGIN_METHOD(Alure_BufferDataFromFile, GB_STRING path; GB_INTEGER buffer)
@ -218,7 +217,6 @@ BEGIN_METHOD(Alure_BufferDataFromFile, GB_STRING path; GB_INTEGER buffer)
GB.ReleaseFile(addr, len);
END_METHOD
BEGIN_METHOD(Alure_CreateStreamFromFile, GB_STRING path; GB_INTEGER chunck_length; GB_INTEGER num_buf)
@ -378,36 +376,36 @@ GB_DESC AlureDesc[] =
GB_DECLARE_VIRTUAL("Alure"),
GB_STATIC_METHOD("_exit", NULL, Alure_exit, NULL),
GB_STATIC_METHOD("GetVersion", "s", Alure_GetVersion, NULL),
GB_STATIC_METHOD("GetErrorString", "s", Alure_GetErrorString, NULL),
GB_STATIC_METHOD("GetDeviceNames", "String[]", Alure_GetDeviceNames, "(All)b"),
GB_STATIC_METHOD("InitDevice", "b", Alure_InitDevice, "[(Name)s(Attributes)Integer[];]"),
GB_STATIC_METHOD("ShutdownDevice", "b", Alure_ShutdownDevice, NULL),
GB_STATIC_METHOD("GetSampleFormat", "i", Alure_GetSampleFormat, "(Channels)i(Bits)i(FloatBits)i"),
GB_STATIC_METHOD("Sleep", "b", Alure_Sleep, "(Duration)f"),
GB_STATIC_METHOD("StreamSizeIsMicroSec", "b", Alure_StreamSizeIsMicroSec, "(UseMicroSeconds)b"),
GB_STATIC_METHOD("CreateBufferFromFile", "i", Alure_CreateBufferFromFile, "(Path)s"),
// GB_STATIC_METHOD("CreateBufferFromMemory", "i", Alure_CreateBufferFromMemory, "(Data)p(Size)i"),
GB_STATIC_METHOD("BufferDataFromFile", "b", Alure_BufferDataFromFile, "(Path)s(Buffer)i"),
// GB_STATIC_METHOD("BufferDataFromMemory", "b", Alure_BufferDataFromMemory, "(Data)p(Size)i(Buffer)i"),
GB_STATIC_METHOD("CreateStreamFromFile", "AlureStream", Alure_CreateStreamFromFile, "(Path)s(ChunkLength)i(NumBuf)i"),
// GB_STATIC_METHOD("CreateStreamFromMemory", "AlureStream", Alure_CreateStreamFromFile, "(Data)p(Length)i(ChunkLength)i(NumBuf)i"),
// GB_STATIC_METHOD("CreateStreamFromStaticMemory", "AlureStream", Alure_CreateStreamFromFile, "(Data)p(Length)i(ChunkLength)i(NumBuf)i"),
GB_STATIC_METHOD("GetStreamBuffers", "Integer[]", Alure_GetStreamBuffers, "(Stream)AlureStream;"),
GB_STATIC_METHOD("GetStreamLength", "l", Alure_GetStreamLength, "(Stream)AlureStream;"),
GB_STATIC_METHOD("GetStreamFrequency", "i", Alure_GetStreamFrequency, "(Stream)AlureStream;"),
GB_STATIC_METHOD("BufferDataFromStream", "i", Alure_BufferDataFromStream, "(Stream)AlureStream;(Buffers)Integer[];"),
GB_STATIC_METHOD("RewindStream", "b", Alure_RewindStream, "(Stream)AlureStream;"),
GB_STATIC_METHOD("SetStreamOrder", "b", Alure_SetStreamOrder, "(Stream)AlureStream;(Order)i"),
GB_STATIC_METHOD("SetStreamPatchset", "b", Alure_SetStreamPatchset, "(Stream)AlureStream;(Patchset)s"),
GB_STATIC_METHOD("DestroyStream", "b", Alure_DestroyStream, "(Stream)AlureStream;"),
GB_STATIC_METHOD("Update", "Integer[]", Alure_Update, NULL),
GB_STATIC_METHOD("UpdateInterval", "b", Alure_UpdateInterval, "(Interval)f"),
GB_STATIC_METHOD("PlaySourceStream", "b", Alure_PlaySourceStream, "(Source)i(Stream)AlureStream;(NumBufs)i(LoopCount)i"),
GB_STATIC_METHOD("PlaySource", "b", Alure_PlaySource, "(Source)i"),
GB_STATIC_METHOD("StopSource", "b", Alure_StopSource, "(Source)i"),
GB_STATIC_METHOD("ResumeSource", "b", Alure_StopSource, "(Source)i"),
GB_STATIC_METHOD("InitDevice", "b", Alure_InitDevice, "[(Name)s(Attributes)Integer[];]"),
GB_STATIC_METHOD("ShutdownDevice", "b", Alure_ShutdownDevice, NULL),
GB_STATIC_METHOD("GetSampleFormat", "i", Alure_GetSampleFormat, "(Channels)i(Bits)i(FloatBits)i"),
GB_STATIC_METHOD("Sleep", "b", Alure_Sleep, "(Duration)f"),
GB_STATIC_METHOD("StreamSizeIsMicroSec", "b", Alure_StreamSizeIsMicroSec, "(UseMicroSeconds)b"),
GB_STATIC_METHOD("CreateBufferFromFile", "i", Alure_CreateBufferFromFile, "(Path)s"),
// GB_STATIC_METHOD("CreateBufferFromMemory", "i", Alure_CreateBufferFromMemory, "(Data)p(Size)i"),
GB_STATIC_METHOD("BufferDataFromFile", "b", Alure_BufferDataFromFile, "(Path)s(Buffer)i"),
// GB_STATIC_METHOD("BufferDataFromMemory", "b", Alure_BufferDataFromMemory, "(Data)p(Size)i(Buffer)i"),
GB_STATIC_METHOD("CreateStreamFromFile", "AlureStream", Alure_CreateStreamFromFile, "(Path)s(ChunkLength)i(NumBuf)i"),
// GB_STATIC_METHOD("CreateStreamFromMemory", "AlureStream", Alure_CreateStreamFromFile, "(Data)p(Length)i(ChunkLength)i(NumBuf)i"),
// GB_STATIC_METHOD("CreateStreamFromStaticMemory", "AlureStream", Alure_CreateStreamFromFile, "(Data)p(Length)i(ChunkLength)i(NumBuf)i"),
GB_STATIC_METHOD("GetStreamBuffers", "Integer[]", Alure_GetStreamBuffers, "(Stream)AlureStream;"),
GB_STATIC_METHOD("GetStreamLength", "l", Alure_GetStreamLength, "(Stream)AlureStream;"),
GB_STATIC_METHOD("GetStreamFrequency", "i", Alure_GetStreamFrequency, "(Stream)AlureStream;"),
GB_STATIC_METHOD("BufferDataFromStream", "i", Alure_BufferDataFromStream, "(Stream)AlureStream;(Buffers)Integer[];"),
GB_STATIC_METHOD("RewindStream", "b", Alure_RewindStream, "(Stream)AlureStream;"),
GB_STATIC_METHOD("SetStreamOrder", "b", Alure_SetStreamOrder, "(Stream)AlureStream;(Order)i"),
GB_STATIC_METHOD("SetStreamPatchset", "b", Alure_SetStreamPatchset, "(Stream)AlureStream;(Patchset)s"),
GB_STATIC_METHOD("DestroyStream", "b", Alure_DestroyStream, "(Stream)AlureStream;"),
GB_STATIC_METHOD("Update", "Integer[]", Alure_Update, NULL),
GB_STATIC_METHOD("UpdateInterval", "b", Alure_UpdateInterval, "(Interval)f"),
GB_STATIC_METHOD("PlaySourceStream", "b", Alure_PlaySourceStream, "(Source)i(Stream)AlureStream;(NumBufs)i(LoopCount)i"),
GB_STATIC_METHOD("PlaySource", "b", Alure_PlaySource, "(Source)i"),
GB_STATIC_METHOD("StopSource", "b", Alure_StopSource, "(Source)i"),
GB_STATIC_METHOD("ResumeSource", "b", Alure_StopSource, "(Source)i"),
GB_END_DECLARE
};