diff options
author | Chris Robinson <[email protected]> | 2007-12-17 16:55:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-17 16:55:07 -0800 |
commit | 635f673b95e30d4681c47792a58a2b0c6b69ea9f (patch) | |
tree | acb4d5e11cb1e6a4ad2f5ef8b5af747aa2c9c362 | |
parent | 35a82970a3c1d175b3d77c5f42d0f720ff2884cb (diff) |
Implement ALC properties
-rw-r--r-- | Alc/ALc.c | 41 |
1 files changed, 38 insertions, 3 deletions
@@ -63,6 +63,9 @@ struct { /////////////////////////////////////////////////////// +#define ALC_EFX_MAJOR_VERSION 0x20001 +#define ALC_EFX_MINOR_VERSION 0x20002 +#define ALC_MAX_AUXILIARY_SENDS 0x20003 /////////////////////////////////////////////////////// // STRING and EXTENSIONS @@ -132,9 +135,14 @@ static ALenums enumeration[]={ { (ALchar *)"ALC_MONO_SOURCES", ALC_MONO_SOURCES }, { (ALchar *)"ALC_STEREO_SOURCES", ALC_STEREO_SOURCES }, { (ALchar *)"ALC_CAPTURE_DEVICE_SPECIFIER", ALC_CAPTURE_DEVICE_SPECIFIER }, - { (ALchar *)"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER", ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER }, + { (ALchar *)"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER", ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER}, { (ALchar *)"ALC_CAPTURE_SAMPLES", ALC_CAPTURE_SAMPLES }, + // EFX Properties + { (ALchar *)"ALC_EFX_MAJOR_VERSION", ALC_EFX_MAJOR_VERSION }, + { (ALchar *)"ALC_EFX_MINOR_VERSION", ALC_EFX_MINOR_VERSION }, + { (ALchar *)"ALC_MAX_AUXILIARY_SENDS", ALC_MAX_AUXILIARY_SENDS }, + // ALC Error Message { (ALchar *)"ALC_NO_ERROR", ALC_NO_ERROR }, { (ALchar *)"ALC_INVALID_DEVICE", ALC_INVALID_DEVICE }, @@ -166,6 +174,9 @@ static ALCchar alcExtensionList[] = "ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT A static ALCint alcMajorVersion = 1; static ALCint alcMinorVersion = 1; +static ALCint alcEFXMajorVersion = 1; +static ALCint alcEFXMinorVersion = 0; + /////////////////////////////////////////////////////// @@ -665,13 +676,34 @@ ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsize *data = alcMinorVersion; break; + case ALC_EFX_MAJOR_VERSION: + if(!size) + SetALCError(ALC_INVALID_VALUE); + else + *data = alcEFXMajorVersion; + break; + + case ALC_EFX_MINOR_VERSION: + if(!size) + SetALCError(ALC_INVALID_VALUE); + else + *data = alcEFXMinorVersion; + break; + + case ALC_MAX_AUXILIARY_SENDS: + if(!size) + SetALCError(ALC_INVALID_VALUE); + else + *data = 0; /* FIXME: Should be 1 or more */ + break; + case ALC_ATTRIBUTES_SIZE: if(!device) SetALCError(ALC_INVALID_DEVICE); else if(!size) SetALCError(ALC_INVALID_VALUE); else - *data = 11; + *data = 12; break; case ALC_ALL_ATTRIBUTES: @@ -693,13 +725,16 @@ ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsize data[i++] = ALC_FALSE; SuspendContext(NULL); - if(device->Context && size >= 11) + if(device->Context && size >= 12) { data[i++] = ALC_MONO_SOURCES; data[i++] = device->Context->lNumMonoSources; data[i++] = ALC_STEREO_SOURCES; data[i++] = device->Context->lNumStereoSources; + + data[i++] = ALC_MAX_AUXILIARY_SENDS; + data[i++] = 0; /* FIXME */ } ProcessContext(NULL); |