Fixed bug 5076 - SDL_netbsdaudio: Add support for 32-bit LPCM
authorSam Lantinga
Sun, 05 Apr 2020 10:44:51 -0700
changeset 1369110a795c0dd52
parent 13690 699e489c7bb6
child 13692 19139846279c
Fixed bug 5076 - SDL_netbsdaudio: Add support for 32-bit LPCM

Nia Alarie

The kernel supports this, make SDL expose it so it can be used.
src/audio/netbsd/SDL_netbsdaudio.c
     1.1 --- a/src/audio/netbsd/SDL_netbsdaudio.c	Sun Apr 05 09:01:33 2020 -0700
     1.2 +++ b/src/audio/netbsd/SDL_netbsdaudio.c	Sun Apr 05 10:44:51 2020 -0700
     1.3 @@ -24,7 +24,7 @@
     1.4  
     1.5  /*
     1.6   * Driver for native NetBSD audio(4).
     1.7 - * vedge@vedge.com.ar.
     1.8 + * nia@NetBSD.org
     1.9   */
    1.10  
    1.11  #include <errno.h>
    1.12 @@ -261,6 +261,14 @@
    1.13              prinfo->encoding = AUDIO_ENCODING_ULINEAR_BE;
    1.14              prinfo->precision = 16;
    1.15              break;
    1.16 +        case AUDIO_S32LSB:
    1.17 +            prinfo->encoding = AUDIO_ENCODING_SLINEAR_LE;
    1.18 +            prinfo->precision = 32;
    1.19 +            break;
    1.20 +        case AUDIO_S32MSB:
    1.21 +            prinfo->encoding = AUDIO_ENCODING_SLINEAR_BE;
    1.22 +            prinfo->precision = 32;
    1.23 +            break;
    1.24          }
    1.25          if (prinfo->encoding != AUDIO_ENCODING_NONE) {
    1.26              break;