Skip to content

Commit

Permalink
Ignore devices with a ridiculous number of channels
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Aug 31, 2021
1 parent 6e3ad6f commit fe867c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FAudio_platform_sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ uint32_t FAudio_PlatformGetDeviceDetails(
for (i = 0; i < devcount; i += 1)
{
SDL_GetAudioDeviceSpec(i, 0, &spec);
if (spec.channels > channels)
if ( (spec.channels > channels) &&
(spec.channels <= 8) )
{
channels = spec.channels;
if (setRate)
Expand Down

0 comments on commit fe867c1

Please sign in to comment.