src/audio/SDL_audiotypecvt.c
changeset 1982 3b4ce57c6215
child 1985 8055185ae4ed
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/audio/SDL_audiotypecvt.c	Thu Aug 24 12:10:46 2006 +0000
     1.3 @@ -0,0 +1,2356 @@
     1.4 +/* DO NOT EDIT THIS FILE! It is generated code. */
     1.5 +/* Please modify SDL/src/audio/sdlgenaudiocvt.pl instead. */
     1.6 +
     1.7 +/*
     1.8 +    SDL - Simple DirectMedia Layer
     1.9 +    Copyright (C) 1997-2006 Sam Lantinga
    1.10 +
    1.11 +    This library is free software; you can redistribute it and/or
    1.12 +    modify it under the terms of the GNU Lesser General Public
    1.13 +    License as published by the Free Software Foundation; either
    1.14 +    version 2.1 of the License, or (at your option) any later version.
    1.15 +
    1.16 +    This library is distributed in the hope that it will be useful,
    1.17 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.19 +    Lesser General Public License for more details.
    1.20 +
    1.21 +    You should have received a copy of the GNU Lesser General Public
    1.22 +    License along with this library; if not, write to the Free Software
    1.23 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.24 +
    1.25 +    Sam Lantinga
    1.26 +    slouken@libsdl.org
    1.27 +*/
    1.28 +
    1.29 +#include "SDL_config.h"
    1.30 +#include "SDL_audio.h"
    1.31 +#include "SDL_audio_c.h"
    1.32 +
    1.33 +/* Now the generated code... */
    1.34 +
    1.35 +#define DIVBY127 0.0078740157480315f
    1.36 +#define DIVBY255 0.00392156862745098f
    1.37 +#define DIVBY32767 3.05185094759972e-05f
    1.38 +#define DIVBY65535 1.52590218966964e-05f
    1.39 +#define DIVBY2147483647 4.6566128752458e-10f
    1.40 +
    1.41 +static void SDLCALL
    1.42 +SDL_Convert_U8_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
    1.43 +{
    1.44 +    int i;
    1.45 +    const Uint8 *src;
    1.46 +    Sint8 *dst;
    1.47 +
    1.48 +#ifdef DEBUG_CONVERT
    1.49 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_S8.\n");
    1.50 +#endif
    1.51 +
    1.52 +    src = (const Uint8 *) cvt->buf;
    1.53 +    dst = (Sint8 *) cvt->buf;
    1.54 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, ++src, ++dst) {
    1.55 +        const Sint8 val = ((*src) ^ 0x80);
    1.56 +        *dst = ((Sint8) val);
    1.57 +    }
    1.58 +
    1.59 +    format = AUDIO_S8;
    1.60 +    if (cvt->filters[++cvt->filter_index]) {
    1.61 +        cvt->filters[cvt->filter_index] (cvt, format);
    1.62 +    }
    1.63 +}
    1.64 +
    1.65 +static void SDLCALL
    1.66 +SDL_Convert_U8_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
    1.67 +{
    1.68 +    int i;
    1.69 +    const Uint8 *src;
    1.70 +    Uint16 *dst;
    1.71 +
    1.72 +#ifdef DEBUG_CONVERT
    1.73 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_U16LSB.\n");
    1.74 +#endif
    1.75 +
    1.76 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
    1.77 +    dst = (Uint16 *) (cvt->buf + cvt->len_cvt * 2);
    1.78 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
    1.79 +        const Uint16 val = (((Uint16) *src) << 8);
    1.80 +        *dst = SDL_SwapLE16(val);
    1.81 +    }
    1.82 +
    1.83 +    cvt->len_cvt *= 2;
    1.84 +    format = AUDIO_U16LSB;
    1.85 +    if (cvt->filters[++cvt->filter_index]) {
    1.86 +        cvt->filters[cvt->filter_index] (cvt, format);
    1.87 +    }
    1.88 +}
    1.89 +
    1.90 +static void SDLCALL
    1.91 +SDL_Convert_U8_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
    1.92 +{
    1.93 +    int i;
    1.94 +    const Uint8 *src;
    1.95 +    Sint16 *dst;
    1.96 +
    1.97 +#ifdef DEBUG_CONVERT
    1.98 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_S16LSB.\n");
    1.99 +#endif
   1.100 +
   1.101 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.102 +    dst = (Sint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.103 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.104 +        const Sint16 val = (((Sint16) ((*src) ^ 0x80)) << 8);
   1.105 +        *dst = ((Sint16) SDL_SwapLE16(val));
   1.106 +    }
   1.107 +
   1.108 +    cvt->len_cvt *= 2;
   1.109 +    format = AUDIO_S16LSB;
   1.110 +    if (cvt->filters[++cvt->filter_index]) {
   1.111 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.112 +    }
   1.113 +}
   1.114 +
   1.115 +static void SDLCALL
   1.116 +SDL_Convert_U8_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.117 +{
   1.118 +    int i;
   1.119 +    const Uint8 *src;
   1.120 +    Uint16 *dst;
   1.121 +
   1.122 +#ifdef DEBUG_CONVERT
   1.123 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_U16MSB.\n");
   1.124 +#endif
   1.125 +
   1.126 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.127 +    dst = (Uint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.128 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.129 +        const Uint16 val = (((Uint16) *src) << 8);
   1.130 +        *dst = SDL_SwapBE16(val);
   1.131 +    }
   1.132 +
   1.133 +    cvt->len_cvt *= 2;
   1.134 +    format = AUDIO_U16MSB;
   1.135 +    if (cvt->filters[++cvt->filter_index]) {
   1.136 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.137 +    }
   1.138 +}
   1.139 +
   1.140 +static void SDLCALL
   1.141 +SDL_Convert_U8_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.142 +{
   1.143 +    int i;
   1.144 +    const Uint8 *src;
   1.145 +    Sint16 *dst;
   1.146 +
   1.147 +#ifdef DEBUG_CONVERT
   1.148 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_S16MSB.\n");
   1.149 +#endif
   1.150 +
   1.151 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.152 +    dst = (Sint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.153 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.154 +        const Sint16 val = (((Sint16) ((*src) ^ 0x80)) << 8);
   1.155 +        *dst = ((Sint16) SDL_SwapBE16(val));
   1.156 +    }
   1.157 +
   1.158 +    cvt->len_cvt *= 2;
   1.159 +    format = AUDIO_S16MSB;
   1.160 +    if (cvt->filters[++cvt->filter_index]) {
   1.161 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.162 +    }
   1.163 +}
   1.164 +
   1.165 +static void SDLCALL
   1.166 +SDL_Convert_U8_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.167 +{
   1.168 +    int i;
   1.169 +    const Uint8 *src;
   1.170 +    Sint32 *dst;
   1.171 +
   1.172 +#ifdef DEBUG_CONVERT
   1.173 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_S32LSB.\n");
   1.174 +#endif
   1.175 +
   1.176 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.177 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 4);
   1.178 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.179 +        const Sint32 val = (((Sint32) ((*src) ^ 0x80)) << 24);
   1.180 +        *dst = ((Sint32) SDL_SwapLE32(val));
   1.181 +    }
   1.182 +
   1.183 +    cvt->len_cvt *= 4;
   1.184 +    format = AUDIO_S32LSB;
   1.185 +    if (cvt->filters[++cvt->filter_index]) {
   1.186 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.187 +    }
   1.188 +}
   1.189 +
   1.190 +static void SDLCALL
   1.191 +SDL_Convert_U8_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.192 +{
   1.193 +    int i;
   1.194 +    const Uint8 *src;
   1.195 +    Sint32 *dst;
   1.196 +
   1.197 +#ifdef DEBUG_CONVERT
   1.198 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_S32MSB.\n");
   1.199 +#endif
   1.200 +
   1.201 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.202 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 4);
   1.203 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.204 +        const Sint32 val = (((Sint32) ((*src) ^ 0x80)) << 24);
   1.205 +        *dst = ((Sint32) SDL_SwapBE32(val));
   1.206 +    }
   1.207 +
   1.208 +    cvt->len_cvt *= 4;
   1.209 +    format = AUDIO_S32MSB;
   1.210 +    if (cvt->filters[++cvt->filter_index]) {
   1.211 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.212 +    }
   1.213 +}
   1.214 +
   1.215 +static void SDLCALL
   1.216 +SDL_Convert_U8_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.217 +{
   1.218 +    int i;
   1.219 +    const Uint8 *src;
   1.220 +    float *dst;
   1.221 +
   1.222 +#ifdef DEBUG_CONVERT
   1.223 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_F32LSB.\n");
   1.224 +#endif
   1.225 +
   1.226 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.227 +    dst = (float *) (cvt->buf + cvt->len_cvt * 4);
   1.228 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.229 +        const float val = (((float) *src) * DIVBY255);
   1.230 +        *dst = SDL_SwapFloatLE(val);
   1.231 +    }
   1.232 +
   1.233 +    cvt->len_cvt *= 4;
   1.234 +    format = AUDIO_F32LSB;
   1.235 +    if (cvt->filters[++cvt->filter_index]) {
   1.236 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.237 +    }
   1.238 +}
   1.239 +
   1.240 +static void SDLCALL
   1.241 +SDL_Convert_U8_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.242 +{
   1.243 +    int i;
   1.244 +    const Uint8 *src;
   1.245 +    float *dst;
   1.246 +
   1.247 +#ifdef DEBUG_CONVERT
   1.248 +    fprintf(stderr, "Converting AUDIO_U8 to AUDIO_F32MSB.\n");
   1.249 +#endif
   1.250 +
   1.251 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.252 +    dst = (float *) (cvt->buf + cvt->len_cvt * 4);
   1.253 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.254 +        const float val = (((float) *src) * DIVBY255);
   1.255 +        *dst = SDL_SwapFloatBE(val);
   1.256 +    }
   1.257 +
   1.258 +    cvt->len_cvt *= 4;
   1.259 +    format = AUDIO_F32MSB;
   1.260 +    if (cvt->filters[++cvt->filter_index]) {
   1.261 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.262 +    }
   1.263 +}
   1.264 +
   1.265 +static void SDLCALL
   1.266 +SDL_Convert_S8_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.267 +{
   1.268 +    int i;
   1.269 +    const Uint8 *src;
   1.270 +    Uint8 *dst;
   1.271 +
   1.272 +#ifdef DEBUG_CONVERT
   1.273 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_U8.\n");
   1.274 +#endif
   1.275 +
   1.276 +    src = (const Uint8 *) cvt->buf;
   1.277 +    dst = (Uint8 *) cvt->buf;
   1.278 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, ++src, ++dst) {
   1.279 +        const Uint8 val = ((((Sint8) *src)) ^ 0x80);
   1.280 +        *dst = val;
   1.281 +    }
   1.282 +
   1.283 +    format = AUDIO_U8;
   1.284 +    if (cvt->filters[++cvt->filter_index]) {
   1.285 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.286 +    }
   1.287 +}
   1.288 +
   1.289 +static void SDLCALL
   1.290 +SDL_Convert_S8_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.291 +{
   1.292 +    int i;
   1.293 +    const Uint8 *src;
   1.294 +    Uint16 *dst;
   1.295 +
   1.296 +#ifdef DEBUG_CONVERT
   1.297 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_U16LSB.\n");
   1.298 +#endif
   1.299 +
   1.300 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.301 +    dst = (Uint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.302 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.303 +        const Uint16 val = (((Uint16) ((((Sint8) *src)) ^ 0x80)) << 8);
   1.304 +        *dst = SDL_SwapLE16(val);
   1.305 +    }
   1.306 +
   1.307 +    cvt->len_cvt *= 2;
   1.308 +    format = AUDIO_U16LSB;
   1.309 +    if (cvt->filters[++cvt->filter_index]) {
   1.310 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.311 +    }
   1.312 +}
   1.313 +
   1.314 +static void SDLCALL
   1.315 +SDL_Convert_S8_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.316 +{
   1.317 +    int i;
   1.318 +    const Uint8 *src;
   1.319 +    Sint16 *dst;
   1.320 +
   1.321 +#ifdef DEBUG_CONVERT
   1.322 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_S16LSB.\n");
   1.323 +#endif
   1.324 +
   1.325 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.326 +    dst = (Sint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.327 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.328 +        const Sint16 val = (((Sint16) ((Sint8) *src)) << 8);
   1.329 +        *dst = ((Sint16) SDL_SwapLE16(val));
   1.330 +    }
   1.331 +
   1.332 +    cvt->len_cvt *= 2;
   1.333 +    format = AUDIO_S16LSB;
   1.334 +    if (cvt->filters[++cvt->filter_index]) {
   1.335 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.336 +    }
   1.337 +}
   1.338 +
   1.339 +static void SDLCALL
   1.340 +SDL_Convert_S8_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.341 +{
   1.342 +    int i;
   1.343 +    const Uint8 *src;
   1.344 +    Uint16 *dst;
   1.345 +
   1.346 +#ifdef DEBUG_CONVERT
   1.347 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_U16MSB.\n");
   1.348 +#endif
   1.349 +
   1.350 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.351 +    dst = (Uint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.352 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.353 +        const Uint16 val = (((Uint16) ((((Sint8) *src)) ^ 0x80)) << 8);
   1.354 +        *dst = SDL_SwapBE16(val);
   1.355 +    }
   1.356 +
   1.357 +    cvt->len_cvt *= 2;
   1.358 +    format = AUDIO_U16MSB;
   1.359 +    if (cvt->filters[++cvt->filter_index]) {
   1.360 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.361 +    }
   1.362 +}
   1.363 +
   1.364 +static void SDLCALL
   1.365 +SDL_Convert_S8_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.366 +{
   1.367 +    int i;
   1.368 +    const Uint8 *src;
   1.369 +    Sint16 *dst;
   1.370 +
   1.371 +#ifdef DEBUG_CONVERT
   1.372 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_S16MSB.\n");
   1.373 +#endif
   1.374 +
   1.375 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.376 +    dst = (Sint16 *) (cvt->buf + cvt->len_cvt * 2);
   1.377 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.378 +        const Sint16 val = (((Sint16) ((Sint8) *src)) << 8);
   1.379 +        *dst = ((Sint16) SDL_SwapBE16(val));
   1.380 +    }
   1.381 +
   1.382 +    cvt->len_cvt *= 2;
   1.383 +    format = AUDIO_S16MSB;
   1.384 +    if (cvt->filters[++cvt->filter_index]) {
   1.385 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.386 +    }
   1.387 +}
   1.388 +
   1.389 +static void SDLCALL
   1.390 +SDL_Convert_S8_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.391 +{
   1.392 +    int i;
   1.393 +    const Uint8 *src;
   1.394 +    Sint32 *dst;
   1.395 +
   1.396 +#ifdef DEBUG_CONVERT
   1.397 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_S32LSB.\n");
   1.398 +#endif
   1.399 +
   1.400 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.401 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 4);
   1.402 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.403 +        const Sint32 val = (((Sint32) ((Sint8) *src)) << 24);
   1.404 +        *dst = ((Sint32) SDL_SwapLE32(val));
   1.405 +    }
   1.406 +
   1.407 +    cvt->len_cvt *= 4;
   1.408 +    format = AUDIO_S32LSB;
   1.409 +    if (cvt->filters[++cvt->filter_index]) {
   1.410 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.411 +    }
   1.412 +}
   1.413 +
   1.414 +static void SDLCALL
   1.415 +SDL_Convert_S8_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.416 +{
   1.417 +    int i;
   1.418 +    const Uint8 *src;
   1.419 +    Sint32 *dst;
   1.420 +
   1.421 +#ifdef DEBUG_CONVERT
   1.422 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_S32MSB.\n");
   1.423 +#endif
   1.424 +
   1.425 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.426 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 4);
   1.427 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.428 +        const Sint32 val = (((Sint32) ((Sint8) *src)) << 24);
   1.429 +        *dst = ((Sint32) SDL_SwapBE32(val));
   1.430 +    }
   1.431 +
   1.432 +    cvt->len_cvt *= 4;
   1.433 +    format = AUDIO_S32MSB;
   1.434 +    if (cvt->filters[++cvt->filter_index]) {
   1.435 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.436 +    }
   1.437 +}
   1.438 +
   1.439 +static void SDLCALL
   1.440 +SDL_Convert_S8_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.441 +{
   1.442 +    int i;
   1.443 +    const Uint8 *src;
   1.444 +    float *dst;
   1.445 +
   1.446 +#ifdef DEBUG_CONVERT
   1.447 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_F32LSB.\n");
   1.448 +#endif
   1.449 +
   1.450 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.451 +    dst = (float *) (cvt->buf + cvt->len_cvt * 4);
   1.452 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.453 +        const float val = (((float) ((Sint8) *src)) * DIVBY127);
   1.454 +        *dst = SDL_SwapFloatLE(val);
   1.455 +    }
   1.456 +
   1.457 +    cvt->len_cvt *= 4;
   1.458 +    format = AUDIO_F32LSB;
   1.459 +    if (cvt->filters[++cvt->filter_index]) {
   1.460 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.461 +    }
   1.462 +}
   1.463 +
   1.464 +static void SDLCALL
   1.465 +SDL_Convert_S8_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.466 +{
   1.467 +    int i;
   1.468 +    const Uint8 *src;
   1.469 +    float *dst;
   1.470 +
   1.471 +#ifdef DEBUG_CONVERT
   1.472 +    fprintf(stderr, "Converting AUDIO_S8 to AUDIO_F32MSB.\n");
   1.473 +#endif
   1.474 +
   1.475 +    src = (const Uint8 *) (cvt->buf + cvt->len_cvt);
   1.476 +    dst = (float *) (cvt->buf + cvt->len_cvt * 4);
   1.477 +    for (i = cvt->len_cvt / sizeof (Uint8); i; --i, --src, --dst) {
   1.478 +        const float val = (((float) ((Sint8) *src)) * DIVBY127);
   1.479 +        *dst = SDL_SwapFloatBE(val);
   1.480 +    }
   1.481 +
   1.482 +    cvt->len_cvt *= 4;
   1.483 +    format = AUDIO_F32MSB;
   1.484 +    if (cvt->filters[++cvt->filter_index]) {
   1.485 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.486 +    }
   1.487 +}
   1.488 +
   1.489 +static void SDLCALL
   1.490 +SDL_Convert_U16LSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.491 +{
   1.492 +    int i;
   1.493 +    const Uint16 *src;
   1.494 +    Uint8 *dst;
   1.495 +
   1.496 +#ifdef DEBUG_CONVERT
   1.497 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_U8.\n");
   1.498 +#endif
   1.499 +
   1.500 +    src = (const Uint16 *) cvt->buf;
   1.501 +    dst = (Uint8 *) cvt->buf;
   1.502 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.503 +        const Uint8 val = ((Uint8) (SDL_SwapLE16(*src) >> 8));
   1.504 +        *dst = val;
   1.505 +    }
   1.506 +
   1.507 +    cvt->len_cvt /= 2;
   1.508 +    format = AUDIO_U8;
   1.509 +    if (cvt->filters[++cvt->filter_index]) {
   1.510 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.511 +    }
   1.512 +}
   1.513 +
   1.514 +static void SDLCALL
   1.515 +SDL_Convert_U16LSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.516 +{
   1.517 +    int i;
   1.518 +    const Uint16 *src;
   1.519 +    Sint8 *dst;
   1.520 +
   1.521 +#ifdef DEBUG_CONVERT
   1.522 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_S8.\n");
   1.523 +#endif
   1.524 +
   1.525 +    src = (const Uint16 *) cvt->buf;
   1.526 +    dst = (Sint8 *) cvt->buf;
   1.527 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.528 +        const Sint8 val = ((Sint8) (((SDL_SwapLE16(*src)) ^ 0x8000) >> 8));
   1.529 +        *dst = ((Sint8) val);
   1.530 +    }
   1.531 +
   1.532 +    cvt->len_cvt /= 2;
   1.533 +    format = AUDIO_S8;
   1.534 +    if (cvt->filters[++cvt->filter_index]) {
   1.535 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.536 +    }
   1.537 +}
   1.538 +
   1.539 +static void SDLCALL
   1.540 +SDL_Convert_U16LSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.541 +{
   1.542 +    int i;
   1.543 +    const Uint16 *src;
   1.544 +    Sint16 *dst;
   1.545 +
   1.546 +#ifdef DEBUG_CONVERT
   1.547 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_S16LSB.\n");
   1.548 +#endif
   1.549 +
   1.550 +    src = (const Uint16 *) cvt->buf;
   1.551 +    dst = (Sint16 *) cvt->buf;
   1.552 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.553 +        const Sint16 val = ((SDL_SwapLE16(*src)) ^ 0x8000);
   1.554 +        *dst = ((Sint16) SDL_SwapLE16(val));
   1.555 +    }
   1.556 +
   1.557 +    format = AUDIO_S16LSB;
   1.558 +    if (cvt->filters[++cvt->filter_index]) {
   1.559 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.560 +    }
   1.561 +}
   1.562 +
   1.563 +static void SDLCALL
   1.564 +SDL_Convert_U16LSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.565 +{
   1.566 +    int i;
   1.567 +    const Uint16 *src;
   1.568 +    Uint16 *dst;
   1.569 +
   1.570 +#ifdef DEBUG_CONVERT
   1.571 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_U16MSB.\n");
   1.572 +#endif
   1.573 +
   1.574 +    src = (const Uint16 *) cvt->buf;
   1.575 +    dst = (Uint16 *) cvt->buf;
   1.576 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.577 +        const Uint16 val = SDL_SwapLE16(*src);
   1.578 +        *dst = SDL_SwapBE16(val);
   1.579 +    }
   1.580 +
   1.581 +    format = AUDIO_U16MSB;
   1.582 +    if (cvt->filters[++cvt->filter_index]) {
   1.583 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.584 +    }
   1.585 +}
   1.586 +
   1.587 +static void SDLCALL
   1.588 +SDL_Convert_U16LSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.589 +{
   1.590 +    int i;
   1.591 +    const Uint16 *src;
   1.592 +    Sint16 *dst;
   1.593 +
   1.594 +#ifdef DEBUG_CONVERT
   1.595 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_S16MSB.\n");
   1.596 +#endif
   1.597 +
   1.598 +    src = (const Uint16 *) cvt->buf;
   1.599 +    dst = (Sint16 *) cvt->buf;
   1.600 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.601 +        const Sint16 val = ((SDL_SwapLE16(*src)) ^ 0x8000);
   1.602 +        *dst = ((Sint16) SDL_SwapBE16(val));
   1.603 +    }
   1.604 +
   1.605 +    format = AUDIO_S16MSB;
   1.606 +    if (cvt->filters[++cvt->filter_index]) {
   1.607 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.608 +    }
   1.609 +}
   1.610 +
   1.611 +static void SDLCALL
   1.612 +SDL_Convert_U16LSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.613 +{
   1.614 +    int i;
   1.615 +    const Uint16 *src;
   1.616 +    Sint32 *dst;
   1.617 +
   1.618 +#ifdef DEBUG_CONVERT
   1.619 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_S32LSB.\n");
   1.620 +#endif
   1.621 +
   1.622 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.623 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
   1.624 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.625 +        const Sint32 val = (((Sint32) ((SDL_SwapLE16(*src)) ^ 0x8000)) << 16);
   1.626 +        *dst = ((Sint32) SDL_SwapLE32(val));
   1.627 +    }
   1.628 +
   1.629 +    cvt->len_cvt *= 2;
   1.630 +    format = AUDIO_S32LSB;
   1.631 +    if (cvt->filters[++cvt->filter_index]) {
   1.632 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.633 +    }
   1.634 +}
   1.635 +
   1.636 +static void SDLCALL
   1.637 +SDL_Convert_U16LSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.638 +{
   1.639 +    int i;
   1.640 +    const Uint16 *src;
   1.641 +    Sint32 *dst;
   1.642 +
   1.643 +#ifdef DEBUG_CONVERT
   1.644 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_S32MSB.\n");
   1.645 +#endif
   1.646 +
   1.647 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.648 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
   1.649 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.650 +        const Sint32 val = (((Sint32) ((SDL_SwapLE16(*src)) ^ 0x8000)) << 16);
   1.651 +        *dst = ((Sint32) SDL_SwapBE32(val));
   1.652 +    }
   1.653 +
   1.654 +    cvt->len_cvt *= 2;
   1.655 +    format = AUDIO_S32MSB;
   1.656 +    if (cvt->filters[++cvt->filter_index]) {
   1.657 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.658 +    }
   1.659 +}
   1.660 +
   1.661 +static void SDLCALL
   1.662 +SDL_Convert_U16LSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.663 +{
   1.664 +    int i;
   1.665 +    const Uint16 *src;
   1.666 +    float *dst;
   1.667 +
   1.668 +#ifdef DEBUG_CONVERT
   1.669 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_F32LSB.\n");
   1.670 +#endif
   1.671 +
   1.672 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.673 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
   1.674 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.675 +        const float val = (((float) SDL_SwapLE16(*src)) * DIVBY65535);
   1.676 +        *dst = SDL_SwapFloatLE(val);
   1.677 +    }
   1.678 +
   1.679 +    cvt->len_cvt *= 2;
   1.680 +    format = AUDIO_F32LSB;
   1.681 +    if (cvt->filters[++cvt->filter_index]) {
   1.682 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.683 +    }
   1.684 +}
   1.685 +
   1.686 +static void SDLCALL
   1.687 +SDL_Convert_U16LSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.688 +{
   1.689 +    int i;
   1.690 +    const Uint16 *src;
   1.691 +    float *dst;
   1.692 +
   1.693 +#ifdef DEBUG_CONVERT
   1.694 +    fprintf(stderr, "Converting AUDIO_U16LSB to AUDIO_F32MSB.\n");
   1.695 +#endif
   1.696 +
   1.697 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.698 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
   1.699 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.700 +        const float val = (((float) SDL_SwapLE16(*src)) * DIVBY65535);
   1.701 +        *dst = SDL_SwapFloatBE(val);
   1.702 +    }
   1.703 +
   1.704 +    cvt->len_cvt *= 2;
   1.705 +    format = AUDIO_F32MSB;
   1.706 +    if (cvt->filters[++cvt->filter_index]) {
   1.707 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.708 +    }
   1.709 +}
   1.710 +
   1.711 +static void SDLCALL
   1.712 +SDL_Convert_S16LSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.713 +{
   1.714 +    int i;
   1.715 +    const Uint16 *src;
   1.716 +    Uint8 *dst;
   1.717 +
   1.718 +#ifdef DEBUG_CONVERT
   1.719 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_U8.\n");
   1.720 +#endif
   1.721 +
   1.722 +    src = (const Uint16 *) cvt->buf;
   1.723 +    dst = (Uint8 *) cvt->buf;
   1.724 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.725 +        const Uint8 val = ((Uint8) (((((Sint16) SDL_SwapLE16(*src))) ^ 0x8000) >> 8));
   1.726 +        *dst = val;
   1.727 +    }
   1.728 +
   1.729 +    cvt->len_cvt /= 2;
   1.730 +    format = AUDIO_U8;
   1.731 +    if (cvt->filters[++cvt->filter_index]) {
   1.732 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.733 +    }
   1.734 +}
   1.735 +
   1.736 +static void SDLCALL
   1.737 +SDL_Convert_S16LSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.738 +{
   1.739 +    int i;
   1.740 +    const Uint16 *src;
   1.741 +    Sint8 *dst;
   1.742 +
   1.743 +#ifdef DEBUG_CONVERT
   1.744 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_S8.\n");
   1.745 +#endif
   1.746 +
   1.747 +    src = (const Uint16 *) cvt->buf;
   1.748 +    dst = (Sint8 *) cvt->buf;
   1.749 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.750 +        const Sint8 val = ((Sint8) (((Sint16) SDL_SwapLE16(*src)) >> 8));
   1.751 +        *dst = ((Sint8) val);
   1.752 +    }
   1.753 +
   1.754 +    cvt->len_cvt /= 2;
   1.755 +    format = AUDIO_S8;
   1.756 +    if (cvt->filters[++cvt->filter_index]) {
   1.757 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.758 +    }
   1.759 +}
   1.760 +
   1.761 +static void SDLCALL
   1.762 +SDL_Convert_S16LSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.763 +{
   1.764 +    int i;
   1.765 +    const Uint16 *src;
   1.766 +    Uint16 *dst;
   1.767 +
   1.768 +#ifdef DEBUG_CONVERT
   1.769 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_U16LSB.\n");
   1.770 +#endif
   1.771 +
   1.772 +    src = (const Uint16 *) cvt->buf;
   1.773 +    dst = (Uint16 *) cvt->buf;
   1.774 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.775 +        const Uint16 val = ((((Sint16) SDL_SwapLE16(*src))) ^ 0x8000);
   1.776 +        *dst = SDL_SwapLE16(val);
   1.777 +    }
   1.778 +
   1.779 +    format = AUDIO_U16LSB;
   1.780 +    if (cvt->filters[++cvt->filter_index]) {
   1.781 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.782 +    }
   1.783 +}
   1.784 +
   1.785 +static void SDLCALL
   1.786 +SDL_Convert_S16LSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.787 +{
   1.788 +    int i;
   1.789 +    const Uint16 *src;
   1.790 +    Uint16 *dst;
   1.791 +
   1.792 +#ifdef DEBUG_CONVERT
   1.793 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_U16MSB.\n");
   1.794 +#endif
   1.795 +
   1.796 +    src = (const Uint16 *) cvt->buf;
   1.797 +    dst = (Uint16 *) cvt->buf;
   1.798 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.799 +        const Uint16 val = ((((Sint16) SDL_SwapLE16(*src))) ^ 0x8000);
   1.800 +        *dst = SDL_SwapBE16(val);
   1.801 +    }
   1.802 +
   1.803 +    format = AUDIO_U16MSB;
   1.804 +    if (cvt->filters[++cvt->filter_index]) {
   1.805 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.806 +    }
   1.807 +}
   1.808 +
   1.809 +static void SDLCALL
   1.810 +SDL_Convert_S16LSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.811 +{
   1.812 +    int i;
   1.813 +    const Uint16 *src;
   1.814 +    Sint16 *dst;
   1.815 +
   1.816 +#ifdef DEBUG_CONVERT
   1.817 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_S16MSB.\n");
   1.818 +#endif
   1.819 +
   1.820 +    src = (const Uint16 *) cvt->buf;
   1.821 +    dst = (Sint16 *) cvt->buf;
   1.822 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.823 +        const Sint16 val = ((Sint16) SDL_SwapLE16(*src));
   1.824 +        *dst = ((Sint16) SDL_SwapBE16(val));
   1.825 +    }
   1.826 +
   1.827 +    format = AUDIO_S16MSB;
   1.828 +    if (cvt->filters[++cvt->filter_index]) {
   1.829 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.830 +    }
   1.831 +}
   1.832 +
   1.833 +static void SDLCALL
   1.834 +SDL_Convert_S16LSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.835 +{
   1.836 +    int i;
   1.837 +    const Uint16 *src;
   1.838 +    Sint32 *dst;
   1.839 +
   1.840 +#ifdef DEBUG_CONVERT
   1.841 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_S32LSB.\n");
   1.842 +#endif
   1.843 +
   1.844 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.845 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
   1.846 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.847 +        const Sint32 val = (((Sint32) ((Sint16) SDL_SwapLE16(*src))) << 16);
   1.848 +        *dst = ((Sint32) SDL_SwapLE32(val));
   1.849 +    }
   1.850 +
   1.851 +    cvt->len_cvt *= 2;
   1.852 +    format = AUDIO_S32LSB;
   1.853 +    if (cvt->filters[++cvt->filter_index]) {
   1.854 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.855 +    }
   1.856 +}
   1.857 +
   1.858 +static void SDLCALL
   1.859 +SDL_Convert_S16LSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.860 +{
   1.861 +    int i;
   1.862 +    const Uint16 *src;
   1.863 +    Sint32 *dst;
   1.864 +
   1.865 +#ifdef DEBUG_CONVERT
   1.866 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_S32MSB.\n");
   1.867 +#endif
   1.868 +
   1.869 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.870 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
   1.871 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.872 +        const Sint32 val = (((Sint32) ((Sint16) SDL_SwapLE16(*src))) << 16);
   1.873 +        *dst = ((Sint32) SDL_SwapBE32(val));
   1.874 +    }
   1.875 +
   1.876 +    cvt->len_cvt *= 2;
   1.877 +    format = AUDIO_S32MSB;
   1.878 +    if (cvt->filters[++cvt->filter_index]) {
   1.879 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.880 +    }
   1.881 +}
   1.882 +
   1.883 +static void SDLCALL
   1.884 +SDL_Convert_S16LSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.885 +{
   1.886 +    int i;
   1.887 +    const Uint16 *src;
   1.888 +    float *dst;
   1.889 +
   1.890 +#ifdef DEBUG_CONVERT
   1.891 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_F32LSB.\n");
   1.892 +#endif
   1.893 +
   1.894 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.895 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
   1.896 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.897 +        const float val = (((float) ((Sint16) SDL_SwapLE16(*src))) * DIVBY32767);
   1.898 +        *dst = SDL_SwapFloatLE(val);
   1.899 +    }
   1.900 +
   1.901 +    cvt->len_cvt *= 2;
   1.902 +    format = AUDIO_F32LSB;
   1.903 +    if (cvt->filters[++cvt->filter_index]) {
   1.904 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.905 +    }
   1.906 +}
   1.907 +
   1.908 +static void SDLCALL
   1.909 +SDL_Convert_S16LSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.910 +{
   1.911 +    int i;
   1.912 +    const Uint16 *src;
   1.913 +    float *dst;
   1.914 +
   1.915 +#ifdef DEBUG_CONVERT
   1.916 +    fprintf(stderr, "Converting AUDIO_S16LSB to AUDIO_F32MSB.\n");
   1.917 +#endif
   1.918 +
   1.919 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
   1.920 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
   1.921 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
   1.922 +        const float val = (((float) ((Sint16) SDL_SwapLE16(*src))) * DIVBY32767);
   1.923 +        *dst = SDL_SwapFloatBE(val);
   1.924 +    }
   1.925 +
   1.926 +    cvt->len_cvt *= 2;
   1.927 +    format = AUDIO_F32MSB;
   1.928 +    if (cvt->filters[++cvt->filter_index]) {
   1.929 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.930 +    }
   1.931 +}
   1.932 +
   1.933 +static void SDLCALL
   1.934 +SDL_Convert_U16MSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.935 +{
   1.936 +    int i;
   1.937 +    const Uint16 *src;
   1.938 +    Uint8 *dst;
   1.939 +
   1.940 +#ifdef DEBUG_CONVERT
   1.941 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_U8.\n");
   1.942 +#endif
   1.943 +
   1.944 +    src = (const Uint16 *) cvt->buf;
   1.945 +    dst = (Uint8 *) cvt->buf;
   1.946 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.947 +        const Uint8 val = ((Uint8) (SDL_SwapBE16(*src) >> 8));
   1.948 +        *dst = val;
   1.949 +    }
   1.950 +
   1.951 +    cvt->len_cvt /= 2;
   1.952 +    format = AUDIO_U8;
   1.953 +    if (cvt->filters[++cvt->filter_index]) {
   1.954 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.955 +    }
   1.956 +}
   1.957 +
   1.958 +static void SDLCALL
   1.959 +SDL_Convert_U16MSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.960 +{
   1.961 +    int i;
   1.962 +    const Uint16 *src;
   1.963 +    Sint8 *dst;
   1.964 +
   1.965 +#ifdef DEBUG_CONVERT
   1.966 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_S8.\n");
   1.967 +#endif
   1.968 +
   1.969 +    src = (const Uint16 *) cvt->buf;
   1.970 +    dst = (Sint8 *) cvt->buf;
   1.971 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.972 +        const Sint8 val = ((Sint8) (((SDL_SwapBE16(*src)) ^ 0x8000) >> 8));
   1.973 +        *dst = ((Sint8) val);
   1.974 +    }
   1.975 +
   1.976 +    cvt->len_cvt /= 2;
   1.977 +    format = AUDIO_S8;
   1.978 +    if (cvt->filters[++cvt->filter_index]) {
   1.979 +        cvt->filters[cvt->filter_index] (cvt, format);
   1.980 +    }
   1.981 +}
   1.982 +
   1.983 +static void SDLCALL
   1.984 +SDL_Convert_U16MSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
   1.985 +{
   1.986 +    int i;
   1.987 +    const Uint16 *src;
   1.988 +    Uint16 *dst;
   1.989 +
   1.990 +#ifdef DEBUG_CONVERT
   1.991 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_U16LSB.\n");
   1.992 +#endif
   1.993 +
   1.994 +    src = (const Uint16 *) cvt->buf;
   1.995 +    dst = (Uint16 *) cvt->buf;
   1.996 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
   1.997 +        const Uint16 val = SDL_SwapBE16(*src);
   1.998 +        *dst = SDL_SwapLE16(val);
   1.999 +    }
  1.1000 +
  1.1001 +    format = AUDIO_U16LSB;
  1.1002 +    if (cvt->filters[++cvt->filter_index]) {
  1.1003 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1004 +    }
  1.1005 +}
  1.1006 +
  1.1007 +static void SDLCALL
  1.1008 +SDL_Convert_U16MSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1009 +{
  1.1010 +    int i;
  1.1011 +    const Uint16 *src;
  1.1012 +    Sint16 *dst;
  1.1013 +
  1.1014 +#ifdef DEBUG_CONVERT
  1.1015 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_S16LSB.\n");
  1.1016 +#endif
  1.1017 +
  1.1018 +    src = (const Uint16 *) cvt->buf;
  1.1019 +    dst = (Sint16 *) cvt->buf;
  1.1020 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1021 +        const Sint16 val = ((SDL_SwapBE16(*src)) ^ 0x8000);
  1.1022 +        *dst = ((Sint16) SDL_SwapLE16(val));
  1.1023 +    }
  1.1024 +
  1.1025 +    format = AUDIO_S16LSB;
  1.1026 +    if (cvt->filters[++cvt->filter_index]) {
  1.1027 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1028 +    }
  1.1029 +}
  1.1030 +
  1.1031 +static void SDLCALL
  1.1032 +SDL_Convert_U16MSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1033 +{
  1.1034 +    int i;
  1.1035 +    const Uint16 *src;
  1.1036 +    Sint16 *dst;
  1.1037 +
  1.1038 +#ifdef DEBUG_CONVERT
  1.1039 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_S16MSB.\n");
  1.1040 +#endif
  1.1041 +
  1.1042 +    src = (const Uint16 *) cvt->buf;
  1.1043 +    dst = (Sint16 *) cvt->buf;
  1.1044 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1045 +        const Sint16 val = ((SDL_SwapBE16(*src)) ^ 0x8000);
  1.1046 +        *dst = ((Sint16) SDL_SwapBE16(val));
  1.1047 +    }
  1.1048 +
  1.1049 +    format = AUDIO_S16MSB;
  1.1050 +    if (cvt->filters[++cvt->filter_index]) {
  1.1051 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1052 +    }
  1.1053 +}
  1.1054 +
  1.1055 +static void SDLCALL
  1.1056 +SDL_Convert_U16MSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1057 +{
  1.1058 +    int i;
  1.1059 +    const Uint16 *src;
  1.1060 +    Sint32 *dst;
  1.1061 +
  1.1062 +#ifdef DEBUG_CONVERT
  1.1063 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_S32LSB.\n");
  1.1064 +#endif
  1.1065 +
  1.1066 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1067 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
  1.1068 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1069 +        const Sint32 val = (((Sint32) ((SDL_SwapBE16(*src)) ^ 0x8000)) << 16);
  1.1070 +        *dst = ((Sint32) SDL_SwapLE32(val));
  1.1071 +    }
  1.1072 +
  1.1073 +    cvt->len_cvt *= 2;
  1.1074 +    format = AUDIO_S32LSB;
  1.1075 +    if (cvt->filters[++cvt->filter_index]) {
  1.1076 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1077 +    }
  1.1078 +}
  1.1079 +
  1.1080 +static void SDLCALL
  1.1081 +SDL_Convert_U16MSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1082 +{
  1.1083 +    int i;
  1.1084 +    const Uint16 *src;
  1.1085 +    Sint32 *dst;
  1.1086 +
  1.1087 +#ifdef DEBUG_CONVERT
  1.1088 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_S32MSB.\n");
  1.1089 +#endif
  1.1090 +
  1.1091 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1092 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
  1.1093 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1094 +        const Sint32 val = (((Sint32) ((SDL_SwapBE16(*src)) ^ 0x8000)) << 16);
  1.1095 +        *dst = ((Sint32) SDL_SwapBE32(val));
  1.1096 +    }
  1.1097 +
  1.1098 +    cvt->len_cvt *= 2;
  1.1099 +    format = AUDIO_S32MSB;
  1.1100 +    if (cvt->filters[++cvt->filter_index]) {
  1.1101 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1102 +    }
  1.1103 +}
  1.1104 +
  1.1105 +static void SDLCALL
  1.1106 +SDL_Convert_U16MSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1107 +{
  1.1108 +    int i;
  1.1109 +    const Uint16 *src;
  1.1110 +    float *dst;
  1.1111 +
  1.1112 +#ifdef DEBUG_CONVERT
  1.1113 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_F32LSB.\n");
  1.1114 +#endif
  1.1115 +
  1.1116 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1117 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
  1.1118 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1119 +        const float val = (((float) SDL_SwapBE16(*src)) * DIVBY65535);
  1.1120 +        *dst = SDL_SwapFloatLE(val);
  1.1121 +    }
  1.1122 +
  1.1123 +    cvt->len_cvt *= 2;
  1.1124 +    format = AUDIO_F32LSB;
  1.1125 +    if (cvt->filters[++cvt->filter_index]) {
  1.1126 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1127 +    }
  1.1128 +}
  1.1129 +
  1.1130 +static void SDLCALL
  1.1131 +SDL_Convert_U16MSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1132 +{
  1.1133 +    int i;
  1.1134 +    const Uint16 *src;
  1.1135 +    float *dst;
  1.1136 +
  1.1137 +#ifdef DEBUG_CONVERT
  1.1138 +    fprintf(stderr, "Converting AUDIO_U16MSB to AUDIO_F32MSB.\n");
  1.1139 +#endif
  1.1140 +
  1.1141 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1142 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
  1.1143 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1144 +        const float val = (((float) SDL_SwapBE16(*src)) * DIVBY65535);
  1.1145 +        *dst = SDL_SwapFloatBE(val);
  1.1146 +    }
  1.1147 +
  1.1148 +    cvt->len_cvt *= 2;
  1.1149 +    format = AUDIO_F32MSB;
  1.1150 +    if (cvt->filters[++cvt->filter_index]) {
  1.1151 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1152 +    }
  1.1153 +}
  1.1154 +
  1.1155 +static void SDLCALL
  1.1156 +SDL_Convert_S16MSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1157 +{
  1.1158 +    int i;
  1.1159 +    const Uint16 *src;
  1.1160 +    Uint8 *dst;
  1.1161 +
  1.1162 +#ifdef DEBUG_CONVERT
  1.1163 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_U8.\n");
  1.1164 +#endif
  1.1165 +
  1.1166 +    src = (const Uint16 *) cvt->buf;
  1.1167 +    dst = (Uint8 *) cvt->buf;
  1.1168 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1169 +        const Uint8 val = ((Uint8) (((((Sint16) SDL_SwapBE16(*src))) ^ 0x8000) >> 8));
  1.1170 +        *dst = val;
  1.1171 +    }
  1.1172 +
  1.1173 +    cvt->len_cvt /= 2;
  1.1174 +    format = AUDIO_U8;
  1.1175 +    if (cvt->filters[++cvt->filter_index]) {
  1.1176 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1177 +    }
  1.1178 +}
  1.1179 +
  1.1180 +static void SDLCALL
  1.1181 +SDL_Convert_S16MSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1182 +{
  1.1183 +    int i;
  1.1184 +    const Uint16 *src;
  1.1185 +    Sint8 *dst;
  1.1186 +
  1.1187 +#ifdef DEBUG_CONVERT
  1.1188 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_S8.\n");
  1.1189 +#endif
  1.1190 +
  1.1191 +    src = (const Uint16 *) cvt->buf;
  1.1192 +    dst = (Sint8 *) cvt->buf;
  1.1193 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1194 +        const Sint8 val = ((Sint8) (((Sint16) SDL_SwapBE16(*src)) >> 8));
  1.1195 +        *dst = ((Sint8) val);
  1.1196 +    }
  1.1197 +
  1.1198 +    cvt->len_cvt /= 2;
  1.1199 +    format = AUDIO_S8;
  1.1200 +    if (cvt->filters[++cvt->filter_index]) {
  1.1201 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1202 +    }
  1.1203 +}
  1.1204 +
  1.1205 +static void SDLCALL
  1.1206 +SDL_Convert_S16MSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1207 +{
  1.1208 +    int i;
  1.1209 +    const Uint16 *src;
  1.1210 +    Uint16 *dst;
  1.1211 +
  1.1212 +#ifdef DEBUG_CONVERT
  1.1213 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_U16LSB.\n");
  1.1214 +#endif
  1.1215 +
  1.1216 +    src = (const Uint16 *) cvt->buf;
  1.1217 +    dst = (Uint16 *) cvt->buf;
  1.1218 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1219 +        const Uint16 val = ((((Sint16) SDL_SwapBE16(*src))) ^ 0x8000);
  1.1220 +        *dst = SDL_SwapLE16(val);
  1.1221 +    }
  1.1222 +
  1.1223 +    format = AUDIO_U16LSB;
  1.1224 +    if (cvt->filters[++cvt->filter_index]) {
  1.1225 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1226 +    }
  1.1227 +}
  1.1228 +
  1.1229 +static void SDLCALL
  1.1230 +SDL_Convert_S16MSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1231 +{
  1.1232 +    int i;
  1.1233 +    const Uint16 *src;
  1.1234 +    Sint16 *dst;
  1.1235 +
  1.1236 +#ifdef DEBUG_CONVERT
  1.1237 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_S16LSB.\n");
  1.1238 +#endif
  1.1239 +
  1.1240 +    src = (const Uint16 *) cvt->buf;
  1.1241 +    dst = (Sint16 *) cvt->buf;
  1.1242 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1243 +        const Sint16 val = ((Sint16) SDL_SwapBE16(*src));
  1.1244 +        *dst = ((Sint16) SDL_SwapLE16(val));
  1.1245 +    }
  1.1246 +
  1.1247 +    format = AUDIO_S16LSB;
  1.1248 +    if (cvt->filters[++cvt->filter_index]) {
  1.1249 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1250 +    }
  1.1251 +}
  1.1252 +
  1.1253 +static void SDLCALL
  1.1254 +SDL_Convert_S16MSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1255 +{
  1.1256 +    int i;
  1.1257 +    const Uint16 *src;
  1.1258 +    Uint16 *dst;
  1.1259 +
  1.1260 +#ifdef DEBUG_CONVERT
  1.1261 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_U16MSB.\n");
  1.1262 +#endif
  1.1263 +
  1.1264 +    src = (const Uint16 *) cvt->buf;
  1.1265 +    dst = (Uint16 *) cvt->buf;
  1.1266 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, ++src, ++dst) {
  1.1267 +        const Uint16 val = ((((Sint16) SDL_SwapBE16(*src))) ^ 0x8000);
  1.1268 +        *dst = SDL_SwapBE16(val);
  1.1269 +    }
  1.1270 +
  1.1271 +    format = AUDIO_U16MSB;
  1.1272 +    if (cvt->filters[++cvt->filter_index]) {
  1.1273 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1274 +    }
  1.1275 +}
  1.1276 +
  1.1277 +static void SDLCALL
  1.1278 +SDL_Convert_S16MSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1279 +{
  1.1280 +    int i;
  1.1281 +    const Uint16 *src;
  1.1282 +    Sint32 *dst;
  1.1283 +
  1.1284 +#ifdef DEBUG_CONVERT
  1.1285 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_S32LSB.\n");
  1.1286 +#endif
  1.1287 +
  1.1288 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1289 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
  1.1290 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1291 +        const Sint32 val = (((Sint32) ((Sint16) SDL_SwapBE16(*src))) << 16);
  1.1292 +        *dst = ((Sint32) SDL_SwapLE32(val));
  1.1293 +    }
  1.1294 +
  1.1295 +    cvt->len_cvt *= 2;
  1.1296 +    format = AUDIO_S32LSB;
  1.1297 +    if (cvt->filters[++cvt->filter_index]) {
  1.1298 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1299 +    }
  1.1300 +}
  1.1301 +
  1.1302 +static void SDLCALL
  1.1303 +SDL_Convert_S16MSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1304 +{
  1.1305 +    int i;
  1.1306 +    const Uint16 *src;
  1.1307 +    Sint32 *dst;
  1.1308 +
  1.1309 +#ifdef DEBUG_CONVERT
  1.1310 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_S32MSB.\n");
  1.1311 +#endif
  1.1312 +
  1.1313 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1314 +    dst = (Sint32 *) (cvt->buf + cvt->len_cvt * 2);
  1.1315 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1316 +        const Sint32 val = (((Sint32) ((Sint16) SDL_SwapBE16(*src))) << 16);
  1.1317 +        *dst = ((Sint32) SDL_SwapBE32(val));
  1.1318 +    }
  1.1319 +
  1.1320 +    cvt->len_cvt *= 2;
  1.1321 +    format = AUDIO_S32MSB;
  1.1322 +    if (cvt->filters[++cvt->filter_index]) {
  1.1323 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1324 +    }
  1.1325 +}
  1.1326 +
  1.1327 +static void SDLCALL
  1.1328 +SDL_Convert_S16MSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1329 +{
  1.1330 +    int i;
  1.1331 +    const Uint16 *src;
  1.1332 +    float *dst;
  1.1333 +
  1.1334 +#ifdef DEBUG_CONVERT
  1.1335 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_F32LSB.\n");
  1.1336 +#endif
  1.1337 +
  1.1338 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1339 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
  1.1340 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1341 +        const float val = (((float) ((Sint16) SDL_SwapBE16(*src))) * DIVBY32767);
  1.1342 +        *dst = SDL_SwapFloatLE(val);
  1.1343 +    }
  1.1344 +
  1.1345 +    cvt->len_cvt *= 2;
  1.1346 +    format = AUDIO_F32LSB;
  1.1347 +    if (cvt->filters[++cvt->filter_index]) {
  1.1348 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1349 +    }
  1.1350 +}
  1.1351 +
  1.1352 +static void SDLCALL
  1.1353 +SDL_Convert_S16MSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1354 +{
  1.1355 +    int i;
  1.1356 +    const Uint16 *src;
  1.1357 +    float *dst;
  1.1358 +
  1.1359 +#ifdef DEBUG_CONVERT
  1.1360 +    fprintf(stderr, "Converting AUDIO_S16MSB to AUDIO_F32MSB.\n");
  1.1361 +#endif
  1.1362 +
  1.1363 +    src = (const Uint16 *) (cvt->buf + cvt->len_cvt);
  1.1364 +    dst = (float *) (cvt->buf + cvt->len_cvt * 2);
  1.1365 +    for (i = cvt->len_cvt / sizeof (Uint16); i; --i, --src, --dst) {
  1.1366 +        const float val = (((float) ((Sint16) SDL_SwapBE16(*src))) * DIVBY32767);
  1.1367 +        *dst = SDL_SwapFloatBE(val);
  1.1368 +    }
  1.1369 +
  1.1370 +    cvt->len_cvt *= 2;
  1.1371 +    format = AUDIO_F32MSB;
  1.1372 +    if (cvt->filters[++cvt->filter_index]) {
  1.1373 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1374 +    }
  1.1375 +}
  1.1376 +
  1.1377 +static void SDLCALL
  1.1378 +SDL_Convert_S32LSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1379 +{
  1.1380 +    int i;
  1.1381 +    const Uint32 *src;
  1.1382 +    Uint8 *dst;
  1.1383 +
  1.1384 +#ifdef DEBUG_CONVERT
  1.1385 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_U8.\n");
  1.1386 +#endif
  1.1387 +
  1.1388 +    src = (const Uint32 *) cvt->buf;
  1.1389 +    dst = (Uint8 *) cvt->buf;
  1.1390 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1391 +        const Uint8 val = ((Uint8) (((((Sint32) SDL_SwapLE32(*src))) ^ 0x80000000) >> 24));
  1.1392 +        *dst = val;
  1.1393 +    }
  1.1394 +
  1.1395 +    cvt->len_cvt /= 4;
  1.1396 +    format = AUDIO_U8;
  1.1397 +    if (cvt->filters[++cvt->filter_index]) {
  1.1398 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1399 +    }
  1.1400 +}
  1.1401 +
  1.1402 +static void SDLCALL
  1.1403 +SDL_Convert_S32LSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1404 +{
  1.1405 +    int i;
  1.1406 +    const Uint32 *src;
  1.1407 +    Sint8 *dst;
  1.1408 +
  1.1409 +#ifdef DEBUG_CONVERT
  1.1410 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_S8.\n");
  1.1411 +#endif
  1.1412 +
  1.1413 +    src = (const Uint32 *) cvt->buf;
  1.1414 +    dst = (Sint8 *) cvt->buf;
  1.1415 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1416 +        const Sint8 val = ((Sint8) (((Sint32) SDL_SwapLE32(*src)) >> 24));
  1.1417 +        *dst = ((Sint8) val);
  1.1418 +    }
  1.1419 +
  1.1420 +    cvt->len_cvt /= 4;
  1.1421 +    format = AUDIO_S8;
  1.1422 +    if (cvt->filters[++cvt->filter_index]) {
  1.1423 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1424 +    }
  1.1425 +}
  1.1426 +
  1.1427 +static void SDLCALL
  1.1428 +SDL_Convert_S32LSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1429 +{
  1.1430 +    int i;
  1.1431 +    const Uint32 *src;
  1.1432 +    Uint16 *dst;
  1.1433 +
  1.1434 +#ifdef DEBUG_CONVERT
  1.1435 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_U16LSB.\n");
  1.1436 +#endif
  1.1437 +
  1.1438 +    src = (const Uint32 *) cvt->buf;
  1.1439 +    dst = (Uint16 *) cvt->buf;
  1.1440 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1441 +        const Uint16 val = ((Uint16) (((((Sint32) SDL_SwapLE32(*src))) ^ 0x80000000) >> 16));
  1.1442 +        *dst = SDL_SwapLE16(val);
  1.1443 +    }
  1.1444 +
  1.1445 +    cvt->len_cvt /= 2;
  1.1446 +    format = AUDIO_U16LSB;
  1.1447 +    if (cvt->filters[++cvt->filter_index]) {
  1.1448 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1449 +    }
  1.1450 +}
  1.1451 +
  1.1452 +static void SDLCALL
  1.1453 +SDL_Convert_S32LSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1454 +{
  1.1455 +    int i;
  1.1456 +    const Uint32 *src;
  1.1457 +    Sint16 *dst;
  1.1458 +
  1.1459 +#ifdef DEBUG_CONVERT
  1.1460 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_S16LSB.\n");
  1.1461 +#endif
  1.1462 +
  1.1463 +    src = (const Uint32 *) cvt->buf;
  1.1464 +    dst = (Sint16 *) cvt->buf;
  1.1465 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1466 +        const Sint16 val = ((Sint16) (((Sint32) SDL_SwapLE32(*src)) >> 16));
  1.1467 +        *dst = ((Sint16) SDL_SwapLE16(val));
  1.1468 +    }
  1.1469 +
  1.1470 +    cvt->len_cvt /= 2;
  1.1471 +    format = AUDIO_S16LSB;
  1.1472 +    if (cvt->filters[++cvt->filter_index]) {
  1.1473 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1474 +    }
  1.1475 +}
  1.1476 +
  1.1477 +static void SDLCALL
  1.1478 +SDL_Convert_S32LSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1479 +{
  1.1480 +    int i;
  1.1481 +    const Uint32 *src;
  1.1482 +    Uint16 *dst;
  1.1483 +
  1.1484 +#ifdef DEBUG_CONVERT
  1.1485 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_U16MSB.\n");
  1.1486 +#endif
  1.1487 +
  1.1488 +    src = (const Uint32 *) cvt->buf;
  1.1489 +    dst = (Uint16 *) cvt->buf;
  1.1490 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1491 +        const Uint16 val = ((Uint16) (((((Sint32) SDL_SwapLE32(*src))) ^ 0x80000000) >> 16));
  1.1492 +        *dst = SDL_SwapBE16(val);
  1.1493 +    }
  1.1494 +
  1.1495 +    cvt->len_cvt /= 2;
  1.1496 +    format = AUDIO_U16MSB;
  1.1497 +    if (cvt->filters[++cvt->filter_index]) {
  1.1498 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1499 +    }
  1.1500 +}
  1.1501 +
  1.1502 +static void SDLCALL
  1.1503 +SDL_Convert_S32LSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1504 +{
  1.1505 +    int i;
  1.1506 +    const Uint32 *src;
  1.1507 +    Sint16 *dst;
  1.1508 +
  1.1509 +#ifdef DEBUG_CONVERT
  1.1510 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_S16MSB.\n");
  1.1511 +#endif
  1.1512 +
  1.1513 +    src = (const Uint32 *) cvt->buf;
  1.1514 +    dst = (Sint16 *) cvt->buf;
  1.1515 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1516 +        const Sint16 val = ((Sint16) (((Sint32) SDL_SwapLE32(*src)) >> 16));
  1.1517 +        *dst = ((Sint16) SDL_SwapBE16(val));
  1.1518 +    }
  1.1519 +
  1.1520 +    cvt->len_cvt /= 2;
  1.1521 +    format = AUDIO_S16MSB;
  1.1522 +    if (cvt->filters[++cvt->filter_index]) {
  1.1523 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1524 +    }
  1.1525 +}
  1.1526 +
  1.1527 +static void SDLCALL
  1.1528 +SDL_Convert_S32LSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1529 +{
  1.1530 +    int i;
  1.1531 +    const Uint32 *src;
  1.1532 +    Sint32 *dst;
  1.1533 +
  1.1534 +#ifdef DEBUG_CONVERT
  1.1535 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_S32MSB.\n");
  1.1536 +#endif
  1.1537 +
  1.1538 +    src = (const Uint32 *) cvt->buf;
  1.1539 +    dst = (Sint32 *) cvt->buf;
  1.1540 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1541 +        const Sint32 val = ((Sint32) SDL_SwapLE32(*src));
  1.1542 +        *dst = ((Sint32) SDL_SwapBE32(val));
  1.1543 +    }
  1.1544 +
  1.1545 +    format = AUDIO_S32MSB;
  1.1546 +    if (cvt->filters[++cvt->filter_index]) {
  1.1547 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1548 +    }
  1.1549 +}
  1.1550 +
  1.1551 +static void SDLCALL
  1.1552 +SDL_Convert_S32LSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1553 +{
  1.1554 +    int i;
  1.1555 +    const Uint32 *src;
  1.1556 +    float *dst;
  1.1557 +
  1.1558 +#ifdef DEBUG_CONVERT
  1.1559 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_F32LSB.\n");
  1.1560 +#endif
  1.1561 +
  1.1562 +    src = (const Uint32 *) cvt->buf;
  1.1563 +    dst = (float *) cvt->buf;
  1.1564 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1565 +        const float val = (((float) ((Sint32) SDL_SwapLE32(*src))) * DIVBY2147483647);
  1.1566 +        *dst = SDL_SwapFloatLE(val);
  1.1567 +    }
  1.1568 +
  1.1569 +    format = AUDIO_F32LSB;
  1.1570 +    if (cvt->filters[++cvt->filter_index]) {
  1.1571 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1572 +    }
  1.1573 +}
  1.1574 +
  1.1575 +static void SDLCALL
  1.1576 +SDL_Convert_S32LSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1577 +{
  1.1578 +    int i;
  1.1579 +    const Uint32 *src;
  1.1580 +    float *dst;
  1.1581 +
  1.1582 +#ifdef DEBUG_CONVERT
  1.1583 +    fprintf(stderr, "Converting AUDIO_S32LSB to AUDIO_F32MSB.\n");
  1.1584 +#endif
  1.1585 +
  1.1586 +    src = (const Uint32 *) cvt->buf;
  1.1587 +    dst = (float *) cvt->buf;
  1.1588 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1589 +        const float val = (((float) ((Sint32) SDL_SwapLE32(*src))) * DIVBY2147483647);
  1.1590 +        *dst = SDL_SwapFloatBE(val);
  1.1591 +    }
  1.1592 +
  1.1593 +    format = AUDIO_F32MSB;
  1.1594 +    if (cvt->filters[++cvt->filter_index]) {
  1.1595 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1596 +    }
  1.1597 +}
  1.1598 +
  1.1599 +static void SDLCALL
  1.1600 +SDL_Convert_S32MSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1601 +{
  1.1602 +    int i;
  1.1603 +    const Uint32 *src;
  1.1604 +    Uint8 *dst;
  1.1605 +
  1.1606 +#ifdef DEBUG_CONVERT
  1.1607 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_U8.\n");
  1.1608 +#endif
  1.1609 +
  1.1610 +    src = (const Uint32 *) cvt->buf;
  1.1611 +    dst = (Uint8 *) cvt->buf;
  1.1612 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1613 +        const Uint8 val = ((Uint8) (((((Sint32) SDL_SwapBE32(*src))) ^ 0x80000000) >> 24));
  1.1614 +        *dst = val;
  1.1615 +    }
  1.1616 +
  1.1617 +    cvt->len_cvt /= 4;
  1.1618 +    format = AUDIO_U8;
  1.1619 +    if (cvt->filters[++cvt->filter_index]) {
  1.1620 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1621 +    }
  1.1622 +}
  1.1623 +
  1.1624 +static void SDLCALL
  1.1625 +SDL_Convert_S32MSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1626 +{
  1.1627 +    int i;
  1.1628 +    const Uint32 *src;
  1.1629 +    Sint8 *dst;
  1.1630 +
  1.1631 +#ifdef DEBUG_CONVERT
  1.1632 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_S8.\n");
  1.1633 +#endif
  1.1634 +
  1.1635 +    src = (const Uint32 *) cvt->buf;
  1.1636 +    dst = (Sint8 *) cvt->buf;
  1.1637 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1638 +        const Sint8 val = ((Sint8) (((Sint32) SDL_SwapBE32(*src)) >> 24));
  1.1639 +        *dst = ((Sint8) val);
  1.1640 +    }
  1.1641 +
  1.1642 +    cvt->len_cvt /= 4;
  1.1643 +    format = AUDIO_S8;
  1.1644 +    if (cvt->filters[++cvt->filter_index]) {
  1.1645 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1646 +    }
  1.1647 +}
  1.1648 +
  1.1649 +static void SDLCALL
  1.1650 +SDL_Convert_S32MSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1651 +{
  1.1652 +    int i;
  1.1653 +    const Uint32 *src;
  1.1654 +    Uint16 *dst;
  1.1655 +
  1.1656 +#ifdef DEBUG_CONVERT
  1.1657 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_U16LSB.\n");
  1.1658 +#endif
  1.1659 +
  1.1660 +    src = (const Uint32 *) cvt->buf;
  1.1661 +    dst = (Uint16 *) cvt->buf;
  1.1662 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1663 +        const Uint16 val = ((Uint16) (((((Sint32) SDL_SwapBE32(*src))) ^ 0x80000000) >> 16));
  1.1664 +        *dst = SDL_SwapLE16(val);
  1.1665 +    }
  1.1666 +
  1.1667 +    cvt->len_cvt /= 2;
  1.1668 +    format = AUDIO_U16LSB;
  1.1669 +    if (cvt->filters[++cvt->filter_index]) {
  1.1670 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1671 +    }
  1.1672 +}
  1.1673 +
  1.1674 +static void SDLCALL
  1.1675 +SDL_Convert_S32MSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1676 +{
  1.1677 +    int i;
  1.1678 +    const Uint32 *src;
  1.1679 +    Sint16 *dst;
  1.1680 +
  1.1681 +#ifdef DEBUG_CONVERT
  1.1682 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_S16LSB.\n");
  1.1683 +#endif
  1.1684 +
  1.1685 +    src = (const Uint32 *) cvt->buf;
  1.1686 +    dst = (Sint16 *) cvt->buf;
  1.1687 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1688 +        const Sint16 val = ((Sint16) (((Sint32) SDL_SwapBE32(*src)) >> 16));
  1.1689 +        *dst = ((Sint16) SDL_SwapLE16(val));
  1.1690 +    }
  1.1691 +
  1.1692 +    cvt->len_cvt /= 2;
  1.1693 +    format = AUDIO_S16LSB;
  1.1694 +    if (cvt->filters[++cvt->filter_index]) {
  1.1695 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1696 +    }
  1.1697 +}
  1.1698 +
  1.1699 +static void SDLCALL
  1.1700 +SDL_Convert_S32MSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1701 +{
  1.1702 +    int i;
  1.1703 +    const Uint32 *src;
  1.1704 +    Uint16 *dst;
  1.1705 +
  1.1706 +#ifdef DEBUG_CONVERT
  1.1707 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_U16MSB.\n");
  1.1708 +#endif
  1.1709 +
  1.1710 +    src = (const Uint32 *) cvt->buf;
  1.1711 +    dst = (Uint16 *) cvt->buf;
  1.1712 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1713 +        const Uint16 val = ((Uint16) (((((Sint32) SDL_SwapBE32(*src))) ^ 0x80000000) >> 16));
  1.1714 +        *dst = SDL_SwapBE16(val);
  1.1715 +    }
  1.1716 +
  1.1717 +    cvt->len_cvt /= 2;
  1.1718 +    format = AUDIO_U16MSB;
  1.1719 +    if (cvt->filters[++cvt->filter_index]) {
  1.1720 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1721 +    }
  1.1722 +}
  1.1723 +
  1.1724 +static void SDLCALL
  1.1725 +SDL_Convert_S32MSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1726 +{
  1.1727 +    int i;
  1.1728 +    const Uint32 *src;
  1.1729 +    Sint16 *dst;
  1.1730 +
  1.1731 +#ifdef DEBUG_CONVERT
  1.1732 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_S16MSB.\n");
  1.1733 +#endif
  1.1734 +
  1.1735 +    src = (const Uint32 *) cvt->buf;
  1.1736 +    dst = (Sint16 *) cvt->buf;
  1.1737 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1738 +        const Sint16 val = ((Sint16) (((Sint32) SDL_SwapBE32(*src)) >> 16));
  1.1739 +        *dst = ((Sint16) SDL_SwapBE16(val));
  1.1740 +    }
  1.1741 +
  1.1742 +    cvt->len_cvt /= 2;
  1.1743 +    format = AUDIO_S16MSB;
  1.1744 +    if (cvt->filters[++cvt->filter_index]) {
  1.1745 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1746 +    }
  1.1747 +}
  1.1748 +
  1.1749 +static void SDLCALL
  1.1750 +SDL_Convert_S32MSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1751 +{
  1.1752 +    int i;
  1.1753 +    const Uint32 *src;
  1.1754 +    Sint32 *dst;
  1.1755 +
  1.1756 +#ifdef DEBUG_CONVERT
  1.1757 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_S32LSB.\n");
  1.1758 +#endif
  1.1759 +
  1.1760 +    src = (const Uint32 *) cvt->buf;
  1.1761 +    dst = (Sint32 *) cvt->buf;
  1.1762 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1763 +        const Sint32 val = ((Sint32) SDL_SwapBE32(*src));
  1.1764 +        *dst = ((Sint32) SDL_SwapLE32(val));
  1.1765 +    }
  1.1766 +
  1.1767 +    format = AUDIO_S32LSB;
  1.1768 +    if (cvt->filters[++cvt->filter_index]) {
  1.1769 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1770 +    }
  1.1771 +}
  1.1772 +
  1.1773 +static void SDLCALL
  1.1774 +SDL_Convert_S32MSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1775 +{
  1.1776 +    int i;
  1.1777 +    const Uint32 *src;
  1.1778 +    float *dst;
  1.1779 +
  1.1780 +#ifdef DEBUG_CONVERT
  1.1781 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_F32LSB.\n");
  1.1782 +#endif
  1.1783 +
  1.1784 +    src = (const Uint32 *) cvt->buf;
  1.1785 +    dst = (float *) cvt->buf;
  1.1786 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1787 +        const float val = (((float) ((Sint32) SDL_SwapBE32(*src))) * DIVBY2147483647);
  1.1788 +        *dst = SDL_SwapFloatLE(val);
  1.1789 +    }
  1.1790 +
  1.1791 +    format = AUDIO_F32LSB;
  1.1792 +    if (cvt->filters[++cvt->filter_index]) {
  1.1793 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1794 +    }
  1.1795 +}
  1.1796 +
  1.1797 +static void SDLCALL
  1.1798 +SDL_Convert_S32MSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1799 +{
  1.1800 +    int i;
  1.1801 +    const Uint32 *src;
  1.1802 +    float *dst;
  1.1803 +
  1.1804 +#ifdef DEBUG_CONVERT
  1.1805 +    fprintf(stderr, "Converting AUDIO_S32MSB to AUDIO_F32MSB.\n");
  1.1806 +#endif
  1.1807 +
  1.1808 +    src = (const Uint32 *) cvt->buf;
  1.1809 +    dst = (float *) cvt->buf;
  1.1810 +    for (i = cvt->len_cvt / sizeof (Uint32); i; --i, ++src, ++dst) {
  1.1811 +        const float val = (((float) ((Sint32) SDL_SwapBE32(*src))) * DIVBY2147483647);
  1.1812 +        *dst = SDL_SwapFloatBE(val);
  1.1813 +    }
  1.1814 +
  1.1815 +    format = AUDIO_F32MSB;
  1.1816 +    if (cvt->filters[++cvt->filter_index]) {
  1.1817 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1818 +    }
  1.1819 +}
  1.1820 +
  1.1821 +static void SDLCALL
  1.1822 +SDL_Convert_F32LSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1823 +{
  1.1824 +    int i;
  1.1825 +    const float *src;
  1.1826 +    Uint8 *dst;
  1.1827 +
  1.1828 +#ifdef DEBUG_CONVERT
  1.1829 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_U8.\n");
  1.1830 +#endif
  1.1831 +
  1.1832 +    src = (const float *) cvt->buf;
  1.1833 +    dst = (Uint8 *) cvt->buf;
  1.1834 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1835 +        const Uint8 val = ((Uint8) (SDL_SwapFloatLE(*src) * 255.0f));
  1.1836 +        *dst = val;
  1.1837 +    }
  1.1838 +
  1.1839 +    cvt->len_cvt /= 4;
  1.1840 +    format = AUDIO_U8;
  1.1841 +    if (cvt->filters[++cvt->filter_index]) {
  1.1842 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1843 +    }
  1.1844 +}
  1.1845 +
  1.1846 +static void SDLCALL
  1.1847 +SDL_Convert_F32LSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1848 +{
  1.1849 +    int i;
  1.1850 +    const float *src;
  1.1851 +    Sint8 *dst;
  1.1852 +
  1.1853 +#ifdef DEBUG_CONVERT
  1.1854 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_S8.\n");
  1.1855 +#endif
  1.1856 +
  1.1857 +    src = (const float *) cvt->buf;
  1.1858 +    dst = (Sint8 *) cvt->buf;
  1.1859 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1860 +        const Sint8 val = ((Sint8) (SDL_SwapFloatLE(*src) * 127.0f));
  1.1861 +        *dst = ((Sint8) val);
  1.1862 +    }
  1.1863 +
  1.1864 +    cvt->len_cvt /= 4;
  1.1865 +    format = AUDIO_S8;
  1.1866 +    if (cvt->filters[++cvt->filter_index]) {
  1.1867 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1868 +    }
  1.1869 +}
  1.1870 +
  1.1871 +static void SDLCALL
  1.1872 +SDL_Convert_F32LSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1873 +{
  1.1874 +    int i;
  1.1875 +    const float *src;
  1.1876 +    Uint16 *dst;
  1.1877 +
  1.1878 +#ifdef DEBUG_CONVERT
  1.1879 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_U16LSB.\n");
  1.1880 +#endif
  1.1881 +
  1.1882 +    src = (const float *) cvt->buf;
  1.1883 +    dst = (Uint16 *) cvt->buf;
  1.1884 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1885 +        const Uint16 val = ((Uint16) (SDL_SwapFloatLE(*src) * 65535.0f));
  1.1886 +        *dst = SDL_SwapLE16(val);
  1.1887 +    }
  1.1888 +
  1.1889 +    cvt->len_cvt /= 2;
  1.1890 +    format = AUDIO_U16LSB;
  1.1891 +    if (cvt->filters[++cvt->filter_index]) {
  1.1892 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1893 +    }
  1.1894 +}
  1.1895 +
  1.1896 +static void SDLCALL
  1.1897 +SDL_Convert_F32LSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1898 +{
  1.1899 +    int i;
  1.1900 +    const float *src;
  1.1901 +    Sint16 *dst;
  1.1902 +
  1.1903 +#ifdef DEBUG_CONVERT
  1.1904 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_S16LSB.\n");
  1.1905 +#endif
  1.1906 +
  1.1907 +    src = (const float *) cvt->buf;
  1.1908 +    dst = (Sint16 *) cvt->buf;
  1.1909 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1910 +        const Sint16 val = ((Sint16) (SDL_SwapFloatLE(*src) * 32767.0f));
  1.1911 +        *dst = ((Sint16) SDL_SwapLE16(val));
  1.1912 +    }
  1.1913 +
  1.1914 +    cvt->len_cvt /= 2;
  1.1915 +    format = AUDIO_S16LSB;
  1.1916 +    if (cvt->filters[++cvt->filter_index]) {
  1.1917 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1918 +    }
  1.1919 +}
  1.1920 +
  1.1921 +static void SDLCALL
  1.1922 +SDL_Convert_F32LSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1923 +{
  1.1924 +    int i;
  1.1925 +    const float *src;
  1.1926 +    Uint16 *dst;
  1.1927 +
  1.1928 +#ifdef DEBUG_CONVERT
  1.1929 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_U16MSB.\n");
  1.1930 +#endif
  1.1931 +
  1.1932 +    src = (const float *) cvt->buf;
  1.1933 +    dst = (Uint16 *) cvt->buf;
  1.1934 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1935 +        const Uint16 val = ((Uint16) (SDL_SwapFloatLE(*src) * 65535.0f));
  1.1936 +        *dst = SDL_SwapBE16(val);
  1.1937 +    }
  1.1938 +
  1.1939 +    cvt->len_cvt /= 2;
  1.1940 +    format = AUDIO_U16MSB;
  1.1941 +    if (cvt->filters[++cvt->filter_index]) {
  1.1942 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1943 +    }
  1.1944 +}
  1.1945 +
  1.1946 +static void SDLCALL
  1.1947 +SDL_Convert_F32LSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1948 +{
  1.1949 +    int i;
  1.1950 +    const float *src;
  1.1951 +    Sint16 *dst;
  1.1952 +
  1.1953 +#ifdef DEBUG_CONVERT
  1.1954 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_S16MSB.\n");
  1.1955 +#endif
  1.1956 +
  1.1957 +    src = (const float *) cvt->buf;
  1.1958 +    dst = (Sint16 *) cvt->buf;
  1.1959 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1960 +        const Sint16 val = ((Sint16) (SDL_SwapFloatLE(*src) * 32767.0f));
  1.1961 +        *dst = ((Sint16) SDL_SwapBE16(val));
  1.1962 +    }
  1.1963 +
  1.1964 +    cvt->len_cvt /= 2;
  1.1965 +    format = AUDIO_S16MSB;
  1.1966 +    if (cvt->filters[++cvt->filter_index]) {
  1.1967 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1968 +    }
  1.1969 +}
  1.1970 +
  1.1971 +static void SDLCALL
  1.1972 +SDL_Convert_F32LSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1973 +{
  1.1974 +    int i;
  1.1975 +    const float *src;
  1.1976 +    Sint32 *dst;
  1.1977 +
  1.1978 +#ifdef DEBUG_CONVERT
  1.1979 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_S32LSB.\n");
  1.1980 +#endif
  1.1981 +
  1.1982 +    src = (const float *) cvt->buf;
  1.1983 +    dst = (Sint32 *) cvt->buf;
  1.1984 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.1985 +        const Sint32 val = ((Sint32) (SDL_SwapFloatLE(*src) * 2147483647.0));
  1.1986 +        *dst = ((Sint32) SDL_SwapLE32(val));
  1.1987 +    }
  1.1988 +
  1.1989 +    format = AUDIO_S32LSB;
  1.1990 +    if (cvt->filters[++cvt->filter_index]) {
  1.1991 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.1992 +    }
  1.1993 +}
  1.1994 +
  1.1995 +static void SDLCALL
  1.1996 +SDL_Convert_F32LSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.1997 +{
  1.1998 +    int i;
  1.1999 +    const float *src;
  1.2000 +    Sint32 *dst;
  1.2001 +
  1.2002 +#ifdef DEBUG_CONVERT
  1.2003 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_S32MSB.\n");
  1.2004 +#endif
  1.2005 +
  1.2006 +    src = (const float *) cvt->buf;
  1.2007 +    dst = (Sint32 *) cvt->buf;
  1.2008 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2009 +        const Sint32 val = ((Sint32) (SDL_SwapFloatLE(*src) * 2147483647.0));
  1.2010 +        *dst = ((Sint32) SDL_SwapBE32(val));
  1.2011 +    }
  1.2012 +
  1.2013 +    format = AUDIO_S32MSB;
  1.2014 +    if (cvt->filters[++cvt->filter_index]) {
  1.2015 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2016 +    }
  1.2017 +}
  1.2018 +
  1.2019 +static void SDLCALL
  1.2020 +SDL_Convert_F32LSB_to_F32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2021 +{
  1.2022 +    int i;
  1.2023 +    const float *src;
  1.2024 +    float *dst;
  1.2025 +
  1.2026 +#ifdef DEBUG_CONVERT
  1.2027 +    fprintf(stderr, "Converting AUDIO_F32LSB to AUDIO_F32MSB.\n");
  1.2028 +#endif
  1.2029 +
  1.2030 +    src = (const float *) cvt->buf;
  1.2031 +    dst = (float *) cvt->buf;
  1.2032 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2033 +        const float val = SDL_SwapFloatLE(*src);
  1.2034 +        *dst = SDL_SwapFloatBE(val);
  1.2035 +    }
  1.2036 +
  1.2037 +    format = AUDIO_F32MSB;
  1.2038 +    if (cvt->filters[++cvt->filter_index]) {
  1.2039 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2040 +    }
  1.2041 +}
  1.2042 +
  1.2043 +static void SDLCALL
  1.2044 +SDL_Convert_F32MSB_to_U8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2045 +{
  1.2046 +    int i;
  1.2047 +    const float *src;
  1.2048 +    Uint8 *dst;
  1.2049 +
  1.2050 +#ifdef DEBUG_CONVERT
  1.2051 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_U8.\n");
  1.2052 +#endif
  1.2053 +
  1.2054 +    src = (const float *) cvt->buf;
  1.2055 +    dst = (Uint8 *) cvt->buf;
  1.2056 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2057 +        const Uint8 val = ((Uint8) (SDL_SwapFloatBE(*src) * 255.0f));
  1.2058 +        *dst = val;
  1.2059 +    }
  1.2060 +
  1.2061 +    cvt->len_cvt /= 4;
  1.2062 +    format = AUDIO_U8;
  1.2063 +    if (cvt->filters[++cvt->filter_index]) {
  1.2064 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2065 +    }
  1.2066 +}
  1.2067 +
  1.2068 +static void SDLCALL
  1.2069 +SDL_Convert_F32MSB_to_S8(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2070 +{
  1.2071 +    int i;
  1.2072 +    const float *src;
  1.2073 +    Sint8 *dst;
  1.2074 +
  1.2075 +#ifdef DEBUG_CONVERT
  1.2076 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_S8.\n");
  1.2077 +#endif
  1.2078 +
  1.2079 +    src = (const float *) cvt->buf;
  1.2080 +    dst = (Sint8 *) cvt->buf;
  1.2081 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2082 +        const Sint8 val = ((Sint8) (SDL_SwapFloatBE(*src) * 127.0f));
  1.2083 +        *dst = ((Sint8) val);
  1.2084 +    }
  1.2085 +
  1.2086 +    cvt->len_cvt /= 4;
  1.2087 +    format = AUDIO_S8;
  1.2088 +    if (cvt->filters[++cvt->filter_index]) {
  1.2089 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2090 +    }
  1.2091 +}
  1.2092 +
  1.2093 +static void SDLCALL
  1.2094 +SDL_Convert_F32MSB_to_U16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2095 +{
  1.2096 +    int i;
  1.2097 +    const float *src;
  1.2098 +    Uint16 *dst;
  1.2099 +
  1.2100 +#ifdef DEBUG_CONVERT
  1.2101 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_U16LSB.\n");
  1.2102 +#endif
  1.2103 +
  1.2104 +    src = (const float *) cvt->buf;
  1.2105 +    dst = (Uint16 *) cvt->buf;
  1.2106 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2107 +        const Uint16 val = ((Uint16) (SDL_SwapFloatBE(*src) * 65535.0f));
  1.2108 +        *dst = SDL_SwapLE16(val);
  1.2109 +    }
  1.2110 +
  1.2111 +    cvt->len_cvt /= 2;
  1.2112 +    format = AUDIO_U16LSB;
  1.2113 +    if (cvt->filters[++cvt->filter_index]) {
  1.2114 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2115 +    }
  1.2116 +}
  1.2117 +
  1.2118 +static void SDLCALL
  1.2119 +SDL_Convert_F32MSB_to_S16LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2120 +{
  1.2121 +    int i;
  1.2122 +    const float *src;
  1.2123 +    Sint16 *dst;
  1.2124 +
  1.2125 +#ifdef DEBUG_CONVERT
  1.2126 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_S16LSB.\n");
  1.2127 +#endif
  1.2128 +
  1.2129 +    src = (const float *) cvt->buf;
  1.2130 +    dst = (Sint16 *) cvt->buf;
  1.2131 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2132 +        const Sint16 val = ((Sint16) (SDL_SwapFloatBE(*src) * 32767.0f));
  1.2133 +        *dst = ((Sint16) SDL_SwapLE16(val));
  1.2134 +    }
  1.2135 +
  1.2136 +    cvt->len_cvt /= 2;
  1.2137 +    format = AUDIO_S16LSB;
  1.2138 +    if (cvt->filters[++cvt->filter_index]) {
  1.2139 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2140 +    }
  1.2141 +}
  1.2142 +
  1.2143 +static void SDLCALL
  1.2144 +SDL_Convert_F32MSB_to_U16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2145 +{
  1.2146 +    int i;
  1.2147 +    const float *src;
  1.2148 +    Uint16 *dst;
  1.2149 +
  1.2150 +#ifdef DEBUG_CONVERT
  1.2151 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_U16MSB.\n");
  1.2152 +#endif
  1.2153 +
  1.2154 +    src = (const float *) cvt->buf;
  1.2155 +    dst = (Uint16 *) cvt->buf;
  1.2156 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2157 +        const Uint16 val = ((Uint16) (SDL_SwapFloatBE(*src) * 65535.0f));
  1.2158 +        *dst = SDL_SwapBE16(val);
  1.2159 +    }
  1.2160 +
  1.2161 +    cvt->len_cvt /= 2;
  1.2162 +    format = AUDIO_U16MSB;
  1.2163 +    if (cvt->filters[++cvt->filter_index]) {
  1.2164 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2165 +    }
  1.2166 +}
  1.2167 +
  1.2168 +static void SDLCALL
  1.2169 +SDL_Convert_F32MSB_to_S16MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2170 +{
  1.2171 +    int i;
  1.2172 +    const float *src;
  1.2173 +    Sint16 *dst;
  1.2174 +
  1.2175 +#ifdef DEBUG_CONVERT
  1.2176 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_S16MSB.\n");
  1.2177 +#endif
  1.2178 +
  1.2179 +    src = (const float *) cvt->buf;
  1.2180 +    dst = (Sint16 *) cvt->buf;
  1.2181 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2182 +        const Sint16 val = ((Sint16) (SDL_SwapFloatBE(*src) * 32767.0f));
  1.2183 +        *dst = ((Sint16) SDL_SwapBE16(val));
  1.2184 +    }
  1.2185 +
  1.2186 +    cvt->len_cvt /= 2;
  1.2187 +    format = AUDIO_S16MSB;
  1.2188 +    if (cvt->filters[++cvt->filter_index]) {
  1.2189 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2190 +    }
  1.2191 +}
  1.2192 +
  1.2193 +static void SDLCALL
  1.2194 +SDL_Convert_F32MSB_to_S32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2195 +{
  1.2196 +    int i;
  1.2197 +    const float *src;
  1.2198 +    Sint32 *dst;
  1.2199 +
  1.2200 +#ifdef DEBUG_CONVERT
  1.2201 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_S32LSB.\n");
  1.2202 +#endif
  1.2203 +
  1.2204 +    src = (const float *) cvt->buf;
  1.2205 +    dst = (Sint32 *) cvt->buf;
  1.2206 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2207 +        const Sint32 val = ((Sint32) (SDL_SwapFloatBE(*src) * 2147483647.0));
  1.2208 +        *dst = ((Sint32) SDL_SwapLE32(val));
  1.2209 +    }
  1.2210 +
  1.2211 +    format = AUDIO_S32LSB;
  1.2212 +    if (cvt->filters[++cvt->filter_index]) {
  1.2213 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2214 +    }
  1.2215 +}
  1.2216 +
  1.2217 +static void SDLCALL
  1.2218 +SDL_Convert_F32MSB_to_S32MSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2219 +{
  1.2220 +    int i;
  1.2221 +    const float *src;
  1.2222 +    Sint32 *dst;
  1.2223 +
  1.2224 +#ifdef DEBUG_CONVERT
  1.2225 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_S32MSB.\n");
  1.2226 +#endif
  1.2227 +
  1.2228 +    src = (const float *) cvt->buf;
  1.2229 +    dst = (Sint32 *) cvt->buf;
  1.2230 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2231 +        const Sint32 val = ((Sint32) (SDL_SwapFloatBE(*src) * 2147483647.0));
  1.2232 +        *dst = ((Sint32) SDL_SwapBE32(val));
  1.2233 +    }
  1.2234 +
  1.2235 +    format = AUDIO_S32MSB;
  1.2236 +    if (cvt->filters[++cvt->filter_index]) {
  1.2237 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2238 +    }
  1.2239 +}
  1.2240 +
  1.2241 +static void SDLCALL
  1.2242 +SDL_Convert_F32MSB_to_F32LSB(SDL_AudioCVT * cvt, SDL_AudioFormat format)
  1.2243 +{
  1.2244 +    int i;
  1.2245 +    const float *src;
  1.2246 +    float *dst;
  1.2247 +
  1.2248 +#ifdef DEBUG_CONVERT
  1.2249 +    fprintf(stderr, "Converting AUDIO_F32MSB to AUDIO_F32LSB.\n");
  1.2250 +#endif
  1.2251 +
  1.2252 +    src = (const float *) cvt->buf;
  1.2253 +    dst = (float *) cvt->buf;
  1.2254 +    for (i = cvt->len_cvt / sizeof (float); i; --i, ++src, ++dst) {
  1.2255 +        const float val = SDL_SwapFloatBE(*src);
  1.2256 +        *dst = SDL_SwapFloatLE(val);
  1.2257 +    }
  1.2258 +
  1.2259 +    format = AUDIO_F32LSB;
  1.2260 +    if (cvt->filters[++cvt->filter_index]) {
  1.2261 +        cvt->filters[cvt->filter_index] (cvt, format);
  1.2262 +    }
  1.2263 +}
  1.2264 +
  1.2265 +const SDL_AudioTypeFilters sdl_audio_type_filters[] =
  1.2266 +{
  1.2267 +    { AUDIO_U8, AUDIO_S8, SDL_Convert_U8_to_S8 },
  1.2268 +    { AUDIO_U8, AUDIO_U16LSB, SDL_Convert_U8_to_U16LSB },
  1.2269 +    { AUDIO_U8, AUDIO_S16LSB, SDL_Convert_U8_to_S16LSB },
  1.2270 +    { AUDIO_U8, AUDIO_U16MSB, SDL_Convert_U8_to_U16MSB },
  1.2271 +    { AUDIO_U8, AUDIO_S16MSB, SDL_Convert_U8_to_S16MSB },
  1.2272 +    { AUDIO_U8, AUDIO_S32LSB, SDL_Convert_U8_to_S32LSB },
  1.2273 +    { AUDIO_U8, AUDIO_S32MSB, SDL_Convert_U8_to_S32MSB },
  1.2274 +    { AUDIO_U8, AUDIO_F32LSB, SDL_Convert_U8_to_F32LSB },
  1.2275 +    { AUDIO_U8, AUDIO_F32MSB, SDL_Convert_U8_to_F32MSB },
  1.2276 +    { AUDIO_S8, AUDIO_U8, SDL_Convert_S8_to_U8 },
  1.2277 +    { AUDIO_S8, AUDIO_U16LSB, SDL_Convert_S8_to_U16LSB },
  1.2278 +    { AUDIO_S8, AUDIO_S16LSB, SDL_Convert_S8_to_S16LSB },
  1.2279 +    { AUDIO_S8, AUDIO_U16MSB, SDL_Convert_S8_to_U16MSB },
  1.2280 +    { AUDIO_S8, AUDIO_S16MSB, SDL_Convert_S8_to_S16MSB },
  1.2281 +    { AUDIO_S8, AUDIO_S32LSB, SDL_Convert_S8_to_S32LSB },
  1.2282 +    { AUDIO_S8, AUDIO_S32MSB, SDL_Convert_S8_to_S32MSB },
  1.2283 +    { AUDIO_S8, AUDIO_F32LSB, SDL_Convert_S8_to_F32LSB },
  1.2284 +    { AUDIO_S8, AUDIO_F32MSB, SDL_Convert_S8_to_F32MSB },
  1.2285 +    { AUDIO_U16LSB, AUDIO_U8, SDL_Convert_U16LSB_to_U8 },
  1.2286 +    { AUDIO_U16LSB, AUDIO_S8, SDL_Convert_U16LSB_to_S8 },
  1.2287 +    { AUDIO_U16LSB, AUDIO_S16LSB, SDL_Convert_U16LSB_to_S16LSB },
  1.2288 +    { AUDIO_U16LSB, AUDIO_U16MSB, SDL_Convert_U16LSB_to_U16MSB },
  1.2289 +    { AUDIO_U16LSB, AUDIO_S16MSB, SDL_Convert_U16LSB_to_S16MSB },
  1.2290 +    { AUDIO_U16LSB, AUDIO_S32LSB, SDL_Convert_U16LSB_to_S32LSB },
  1.2291 +    { AUDIO_U16LSB, AUDIO_S32MSB, SDL_Convert_U16LSB_to_S32MSB },
  1.2292 +    { AUDIO_U16LSB, AUDIO_F32LSB, SDL_Convert_U16LSB_to_F32LSB },
  1.2293 +    { AUDIO_U16LSB, AUDIO_F32MSB, SDL_Convert_U16LSB_to_F32MSB },
  1.2294 +    { AUDIO_S16LSB, AUDIO_U8, SDL_Convert_S16LSB_to_U8 },
  1.2295 +    { AUDIO_S16LSB, AUDIO_S8, SDL_Convert_S16LSB_to_S8 },
  1.2296 +    { AUDIO_S16LSB, AUDIO_U16LSB, SDL_Convert_S16LSB_to_U16LSB },
  1.2297 +    { AUDIO_S16LSB, AUDIO_U16MSB, SDL_Convert_S16LSB_to_U16MSB },
  1.2298 +    { AUDIO_S16LSB, AUDIO_S16MSB, SDL_Convert_S16LSB_to_S16MSB },
  1.2299 +    { AUDIO_S16LSB, AUDIO_S32LSB, SDL_Convert_S16LSB_to_S32LSB },
  1.2300 +    { AUDIO_S16LSB, AUDIO_S32MSB, SDL_Convert_S16LSB_to_S32MSB },
  1.2301 +    { AUDIO_S16LSB, AUDIO_F32LSB, SDL_Convert_S16LSB_to_F32LSB },
  1.2302 +    { AUDIO_S16LSB, AUDIO_F32MSB, SDL_Convert_S16LSB_to_F32MSB },
  1.2303 +    { AUDIO_U16MSB, AUDIO_U8, SDL_Convert_U16MSB_to_U8 },
  1.2304 +    { AUDIO_U16MSB, AUDIO_S8, SDL_Convert_U16MSB_to_S8 },
  1.2305 +    { AUDIO_U16MSB, AUDIO_U16LSB, SDL_Convert_U16MSB_to_U16LSB },
  1.2306 +    { AUDIO_U16MSB, AUDIO_S16LSB, SDL_Convert_U16MSB_to_S16LSB },
  1.2307 +    { AUDIO_U16MSB, AUDIO_S16MSB, SDL_Convert_U16MSB_to_S16MSB },
  1.2308 +    { AUDIO_U16MSB, AUDIO_S32LSB, SDL_Convert_U16MSB_to_S32LSB },
  1.2309 +    { AUDIO_U16MSB, AUDIO_S32MSB, SDL_Convert_U16MSB_to_S32MSB },
  1.2310 +    { AUDIO_U16MSB, AUDIO_F32LSB, SDL_Convert_U16MSB_to_F32LSB },
  1.2311 +    { AUDIO_U16MSB, AUDIO_F32MSB, SDL_Convert_U16MSB_to_F32MSB },
  1.2312 +    { AUDIO_S16MSB, AUDIO_U8, SDL_Convert_S16MSB_to_U8 },
  1.2313 +    { AUDIO_S16MSB, AUDIO_S8, SDL_Convert_S16MSB_to_S8 },
  1.2314 +    { AUDIO_S16MSB, AUDIO_U16LSB, SDL_Convert_S16MSB_to_U16LSB },
  1.2315 +    { AUDIO_S16MSB, AUDIO_S16LSB, SDL_Convert_S16MSB_to_S16LSB },
  1.2316 +    { AUDIO_S16MSB, AUDIO_U16MSB, SDL_Convert_S16MSB_to_U16MSB },
  1.2317 +    { AUDIO_S16MSB, AUDIO_S32LSB, SDL_Convert_S16MSB_to_S32LSB },
  1.2318 +    { AUDIO_S16MSB, AUDIO_S32MSB, SDL_Convert_S16MSB_to_S32MSB },
  1.2319 +    { AUDIO_S16MSB, AUDIO_F32LSB, SDL_Convert_S16MSB_to_F32LSB },
  1.2320 +    { AUDIO_S16MSB, AUDIO_F32MSB, SDL_Convert_S16MSB_to_F32MSB },
  1.2321 +    { AUDIO_S32LSB, AUDIO_U8, SDL_Convert_S32LSB_to_U8 },
  1.2322 +    { AUDIO_S32LSB, AUDIO_S8, SDL_Convert_S32LSB_to_S8 },
  1.2323 +    { AUDIO_S32LSB, AUDIO_U16LSB, SDL_Convert_S32LSB_to_U16LSB },
  1.2324 +    { AUDIO_S32LSB, AUDIO_S16LSB, SDL_Convert_S32LSB_to_S16LSB },
  1.2325 +    { AUDIO_S32LSB, AUDIO_U16MSB, SDL_Convert_S32LSB_to_U16MSB },
  1.2326 +    { AUDIO_S32LSB, AUDIO_S16MSB, SDL_Convert_S32LSB_to_S16MSB },
  1.2327 +    { AUDIO_S32LSB, AUDIO_S32MSB, SDL_Convert_S32LSB_to_S32MSB },
  1.2328 +    { AUDIO_S32LSB, AUDIO_F32LSB, SDL_Convert_S32LSB_to_F32LSB },
  1.2329 +    { AUDIO_S32LSB, AUDIO_F32MSB, SDL_Convert_S32LSB_to_F32MSB },
  1.2330 +    { AUDIO_S32MSB, AUDIO_U8, SDL_Convert_S32MSB_to_U8 },
  1.2331 +    { AUDIO_S32MSB, AUDIO_S8, SDL_Convert_S32MSB_to_S8 },
  1.2332 +    { AUDIO_S32MSB, AUDIO_U16LSB, SDL_Convert_S32MSB_to_U16LSB },
  1.2333 +    { AUDIO_S32MSB, AUDIO_S16LSB, SDL_Convert_S32MSB_to_S16LSB },
  1.2334 +    { AUDIO_S32MSB, AUDIO_U16MSB, SDL_Convert_S32MSB_to_U16MSB },
  1.2335 +    { AUDIO_S32MSB, AUDIO_S16MSB, SDL_Convert_S32MSB_to_S16MSB },
  1.2336 +    { AUDIO_S32MSB, AUDIO_S32LSB, SDL_Convert_S32MSB_to_S32LSB },
  1.2337 +    { AUDIO_S32MSB, AUDIO_F32LSB, SDL_Convert_S32MSB_to_F32LSB },
  1.2338 +    { AUDIO_S32MSB, AUDIO_F32MSB, SDL_Convert_S32MSB_to_F32MSB },
  1.2339 +    { AUDIO_F32LSB, AUDIO_U8, SDL_Convert_F32LSB_to_U8 },
  1.2340 +    { AUDIO_F32LSB, AUDIO_S8, SDL_Convert_F32LSB_to_S8 },
  1.2341 +    { AUDIO_F32LSB, AUDIO_U16LSB, SDL_Convert_F32LSB_to_U16LSB },
  1.2342 +    { AUDIO_F32LSB, AUDIO_S16LSB, SDL_Convert_F32LSB_to_S16LSB },
  1.2343 +    { AUDIO_F32LSB, AUDIO_U16MSB, SDL_Convert_F32LSB_to_U16MSB },
  1.2344 +    { AUDIO_F32LSB, AUDIO_S16MSB, SDL_Convert_F32LSB_to_S16MSB },
  1.2345 +    { AUDIO_F32LSB, AUDIO_S32LSB, SDL_Convert_F32LSB_to_S32LSB },
  1.2346 +    { AUDIO_F32LSB, AUDIO_S32MSB, SDL_Convert_F32LSB_to_S32MSB },
  1.2347 +    { AUDIO_F32LSB, AUDIO_F32MSB, SDL_Convert_F32LSB_to_F32MSB },
  1.2348 +    { AUDIO_F32MSB, AUDIO_U8, SDL_Convert_F32MSB_to_U8 },
  1.2349 +    { AUDIO_F32MSB, AUDIO_S8, SDL_Convert_F32MSB_to_S8 },
  1.2350 +    { AUDIO_F32MSB, AUDIO_U16LSB, SDL_Convert_F32MSB_to_U16LSB },
  1.2351 +    { AUDIO_F32MSB, AUDIO_S16LSB, SDL_Convert_F32MSB_to_S16LSB },
  1.2352 +    { AUDIO_F32MSB, AUDIO_U16MSB, SDL_Convert_F32MSB_to_U16MSB },
  1.2353 +    { AUDIO_F32MSB, AUDIO_S16MSB, SDL_Convert_F32MSB_to_S16MSB },
  1.2354 +    { AUDIO_F32MSB, AUDIO_S32LSB, SDL_Convert_F32MSB_to_S32LSB },
  1.2355 +    { AUDIO_F32MSB, AUDIO_S32MSB, SDL_Convert_F32MSB_to_S32MSB },
  1.2356 +    { AUDIO_F32MSB, AUDIO_F32LSB, SDL_Convert_F32MSB_to_F32LSB },
  1.2357 +};
  1.2358 +
  1.2359 +