Fixed audio conversion for unsigned 16 bit data.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Mon, 07 Nov 2016 21:10:01 +0100
changeset 105919717b0804467
parent 10590 e75e81f94e47
child 10592 a5667285680d
Fixed audio conversion for unsigned 16 bit data.
src/audio/SDL_audiocvt.c
     1.1 --- a/src/audio/SDL_audiocvt.c	Sun Nov 06 20:26:48 2016 -0800
     1.2 +++ b/src/audio/SDL_audiocvt.c	Mon Nov 07 21:10:01 2016 +0100
     1.3 @@ -266,6 +266,7 @@
     1.4              case AUDIO_S8: filter = SDL_Convert_S8_to_F32; break;
     1.5              case AUDIO_U8: filter = SDL_Convert_U8_to_F32; break;
     1.6              case AUDIO_S16: filter = SDL_Convert_S16_to_F32; break;
     1.7 +            case AUDIO_U16: filter = SDL_Convert_U16_to_F32; break;
     1.8              case AUDIO_S32: filter = SDL_Convert_S32_to_F32; break;
     1.9              default: SDL_assert(!"Unexpected audio format!"); break;
    1.10          }
    1.11 @@ -302,6 +303,7 @@
    1.12              case AUDIO_S8: filter = SDL_Convert_F32_to_S8; break;
    1.13              case AUDIO_U8: filter = SDL_Convert_F32_to_U8; break;
    1.14              case AUDIO_S16: filter = SDL_Convert_F32_to_S16; break;
    1.15 +            case AUDIO_U16: filter = SDL_Convert_F32_to_U16; break;
    1.16              case AUDIO_S32: filter = SDL_Convert_F32_to_S32; break;
    1.17              default: SDL_assert(!"Unexpected audio format!"); break;
    1.18          }