aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFontsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-15 22:18:07 -0800
committerChris Robinson <[email protected]>2014-01-15 22:18:07 -0800
commite118ac93a01c15adee8e6d81a99dda73a985c54d (patch)
treed0629a04fd04ffb8222f2a1001bd8761c8380318 /OpenAL32/alFontsound.c
parent9ebeae62285092712cc10642802711e7a24b1043 (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/alFontsound.c')
-rw-r--r--OpenAL32/alFontsound.c4
1 files changed, 2 insertions, 2 deletions
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;