Skip to content

Commit b7d67d8

Browse files
committed
Don't error when querying unknown enums for the channel config and sample format
1 parent 7e5b13a commit b7d67d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Alc/ALc.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -2788,11 +2788,10 @@ ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device
27882788
alcSetError(device, ALC_INVALID_DEVICE);
27892789
else if(freq <= 0)
27902790
alcSetError(device, ALC_INVALID_VALUE);
2791-
else if(!IsValidALCType(type) || !IsValidALCChannels(channels))
2792-
alcSetError(device, ALC_INVALID_ENUM);
27932791
else
27942792
{
2795-
if(BytesFromDevFmt(type) > 0 && ChannelsFromDevFmt(channels) > 0 &&
2793+
if(IsValidALCType(type) && BytesFromDevFmt(type) > 0 &&
2794+
IsValidALCChannels(channels) && ChannelsFromDevFmt(channels) > 0 &&
27962795
freq >= MIN_OUTPUT_RATE)
27972796
ret = ALC_TRUE;
27982797
}

0 commit comments

Comments
 (0)