diff options
author | Chris Robinson <[email protected]> | 2014-01-15 22:18:07 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-01-15 22:18:07 -0800 |
commit | e118ac93a01c15adee8e6d81a99dda73a985c54d (patch) | |
tree | d0629a04fd04ffb8222f2a1001bd8761c8380318 /OpenAL32 | |
parent | 9ebeae62285092712cc10642802711e7a24b1043 (diff) |
Handle fontsound sample types using explicit enum values
Uses AL_MONO_SOFT, AL_RIGHT_SOFT, and AL_LEFT_SOFT. "Linked" samples types
aren't explicitly supported due to being under-defined in the SF2 spec, nor are
ROM samples currently.
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 2 | ||||
-rw-r--r-- | OpenAL32/alFontsound.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 3394eab2..82105ab6 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -127,6 +127,8 @@ #define AL_EXCLUSIVE_CLASS_SOFT 0x0039 #define AL_LOOP_CONTINUOUS_SOFT 0x0001 #define AL_LOOP_UNTIL_RELEASE_SOFT 0x0003 +#define AL_RIGHT_SOFT 0x0002 +#define AL_LEFT_SOFT 0x0004 #define AL_FORMAT_TYPE_SOFT 0x1991 #define AL_NOTEOFF_SOFT 0x0080 #define AL_NOTEON_SOFT 0x0090 diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c index 4a195c21..3adb5783 100644 --- a/OpenAL32/alFontsound.c +++ b/OpenAL32/alFontsound.c @@ -572,7 +572,7 @@ static void ALfontsound_Construct(ALfontsound *self) self->SampleRate = 0; self->PitchKey = 0; self->PitchCorrection = 0; - self->SampleType = AL_NONE; + self->SampleType = AL_MONO_SOFT; self->Link = NULL; InitUIntMap(&self->ModulatorMap, ~0); @@ -781,7 +781,7 @@ void ALfontsound_setPropi(ALfontsound *self, ALCcontext *context, ALenum param, break; case AL_SAMPLE_TYPE_SOFT: - if(!(value >= 1 && value <= 4)) + if(!(value == AL_MONO_SOFT || value == AL_RIGHT_SOFT || value == AL_LEFT_SOFT)) SET_ERROR_AND_RETURN(context, AL_INVALID_VALUE); self->SampleType = value; break; |