diff options
Diffstat (limited to 'OpenAL32/alSource.cpp')
-rw-r--r-- | OpenAL32/alSource.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index 8ee94600..0955d1e9 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -584,7 +584,7 @@ inline ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id) noexcept } -enum SourceProp { +enum SourceProp : ALenum { srcPitch = AL_PITCH, srcGain = AL_GAIN, srcMinGain = AL_MIN_GAIN, @@ -710,9 +710,7 @@ void SendStateChangeEvent(ALCcontext *context, ALuint id, ALenum state) ALint FloatValsByProp(ALenum prop) { - if(prop != (ALenum)((SourceProp)prop)) - return 0; - switch((SourceProp)prop) + switch(static_cast<SourceProp>(prop)) { case AL_PITCH: case AL_GAIN: @@ -774,9 +772,7 @@ ALint FloatValsByProp(ALenum prop) } ALint DoubleValsByProp(ALenum prop) { - if(prop != (ALenum)((SourceProp)prop)) - return 0; - switch((SourceProp)prop) + switch(static_cast<SourceProp>(prop)) { case AL_PITCH: case AL_GAIN: @@ -837,9 +833,7 @@ ALint DoubleValsByProp(ALenum prop) ALint IntValsByProp(ALenum prop) { - if(prop != (ALenum)((SourceProp)prop)) - return 0; - switch((SourceProp)prop) + switch(static_cast<SourceProp>(prop)) { case AL_PITCH: case AL_GAIN: @@ -898,9 +892,7 @@ ALint IntValsByProp(ALenum prop) } ALint Int64ValsByProp(ALenum prop) { - if(prop != (ALenum)((SourceProp)prop)) - return 0; - switch((SourceProp)prop) + switch(static_cast<SourceProp>(prop)) { case AL_PITCH: case AL_GAIN: |