This commit is contained in:
Charlie Birks 2014-01-28 09:59:52 +00:00
Родитель 9294c37f65
Коммит 1083b6e1f6
1 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -1173,43 +1173,44 @@ var LibraryOpenAL = {
alGetString: function(param) { alGetString: function(param) {
if (AL.stringCache[param]) return AL.stringCache[param]; if (AL.stringCache[param]) return AL.stringCache[param];
var ret; var ret;
switch (param) switch (param) {
{
case 0 /* AL_NO_ERROR */: case 0 /* AL_NO_ERROR */:
ret = allocate(intArrayFromString('No Error'), 'i8', ALLOC_NORMAL); ret = 'No Error';
break; break;
case 0xA001 /* AL_INVALID_NAME */: case 0xA001 /* AL_INVALID_NAME */:
ret = allocate(intArrayFromString('Invalid Name'), 'i8', ALLOC_NORMAL); ret = 'Invalid Name';
break; break;
case 0xA002 /* AL_INVALID_ENUM */: case 0xA002 /* AL_INVALID_ENUM */:
ret = allocate(intArrayFromString('Invalid Enum'), 'i8', ALLOC_NORMAL); ret = 'Invalid Enum';
break; break;
case 0xA003 /* AL_INVALID_VALUE */: case 0xA003 /* AL_INVALID_VALUE */:
ret = allocate(intArrayFromString('Invalid Value'), 'i8', ALLOC_NORMAL); ret = 'Invalid Value';
break; break;
case 0xA004 /* AL_INVALID_OPERATION */: case 0xA004 /* AL_INVALID_OPERATION */:
ret = allocate(intArrayFromString('Invalid Operation'), 'i8', ALLOC_NORMAL); ret = 'Invalid Operation';
break; break;
case 0xA005 /* AL_OUT_OF_MEMORY */: case 0xA005 /* AL_OUT_OF_MEMORY */:
ret = allocate(intArrayFromString('Out of Memory'), 'i8', ALLOC_NORMAL); ret = 'Out of Memory';
break; break;
case 0xB001 /* AL_VENDOR */: case 0xB001 /* AL_VENDOR */:
ret = allocate(intArrayFromString('Emscripten'), 'i8', ALLOC_NORMAL); ret = 'Emscripten';
break; break;
case 0xB002 /* AL_VERSION */: case 0xB002 /* AL_VERSION */:
ret = allocate(intArrayFromString('1.1'), 'i8', ALLOC_NORMAL); ret = '1.1';
break; break;
case 0xB003 /* AL_RENDERER */: case 0xB003 /* AL_RENDERER */:
ret = allocate(intArrayFromString('WebAudio'), 'i8', ALLOC_NORMAL); ret = 'WebAudio';
break; break;
case 0xB004 /* AL_EXTENSIONS */: case 0xB004 /* AL_EXTENSIONS */:
ret = allocate(intArrayFromString(''), 'i8', ALLOC_NORMAL); ret = '';
break; break;
default: default:
AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */; AL.currentContext.err = 0xA002 /* AL_INVALID_ENUM */;
return 0; return 0;
} }
ret = allocate(intArrayFromString(ret), 'i8', ALLOC_NORMAL);
AL.stringCache[param] = ret; AL.stringCache[param] = ret;
return ret; return ret;