src/audio/SDL_audio_c.h
changeset 10575 bb99dede0675
parent 10239 04cda108b406
child 10737 3406a0f8b041
     1.1 --- a/src/audio/SDL_audio_c.h	Thu Nov 03 11:10:52 2016 -0400
     1.2 +++ b/src/audio/SDL_audio_c.h	Sat Nov 05 02:34:38 2016 -0400
     1.3 @@ -20,6 +20,16 @@
     1.4  */
     1.5  #include "../SDL_internal.h"
     1.6  
     1.7 +#ifndef DEBUG_CONVERT
     1.8 +#define DEBUG_CONVERT 0
     1.9 +#endif
    1.10 +
    1.11 +#if DEBUG_CONVERT
    1.12 +#define LOG_DEBUG_CONVERT(from, to) fprintf(stderr, "Converting %s to %s.\n", from, to);
    1.13 +#else
    1.14 +#define LOG_DEBUG_CONVERT(from, to)
    1.15 +#endif
    1.16 +
    1.17  /* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */
    1.18  
    1.19  /* Functions to get a list of "close" audio formats */
    1.20 @@ -29,24 +39,20 @@
    1.21  /* Function to calculate the size and silence for a SDL_AudioSpec */
    1.22  extern void SDL_CalculateAudioSpec(SDL_AudioSpec * spec);
    1.23  
    1.24 -/* this is used internally to access some autogenerated code. */
    1.25 -typedef struct
    1.26 -{
    1.27 -    SDL_AudioFormat src_fmt;
    1.28 -    SDL_AudioFormat dst_fmt;
    1.29 -    SDL_AudioFilter filter;
    1.30 -} SDL_AudioTypeFilters;
    1.31 -extern const SDL_AudioTypeFilters sdl_audio_type_filters[];
    1.32 -
    1.33 -/* this is used internally to access some autogenerated code. */
    1.34 -typedef struct
    1.35 -{
    1.36 -    SDL_AudioFormat fmt;
    1.37 -    int channels;
    1.38 -    int upsample;
    1.39 -    int multiple;
    1.40 -    SDL_AudioFilter filter;
    1.41 -} SDL_AudioRateFilters;
    1.42 -extern const SDL_AudioRateFilters sdl_audio_rate_filters[];
    1.43 +void SDLCALL SDL_Convert_S8_to_F32(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.44 +void SDLCALL SDL_Convert_U8_to_F32(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.45 +void SDLCALL SDL_Convert_S16_to_F32(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.46 +void SDLCALL SDL_Convert_U16_to_F32(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.47 +void SDLCALL SDL_Convert_S32_to_F32(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.48 +void SDLCALL SDL_Convert_F32_to_S8(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.49 +void SDLCALL SDL_Convert_F32_to_U8(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.50 +void SDLCALL SDL_Convert_F32_to_S16(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.51 +void SDLCALL SDL_Convert_F32_to_U16(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.52 +void SDLCALL SDL_Convert_F32_to_S32(SDL_AudioCVT *cvt, SDL_AudioFormat format);
    1.53 +void SDL_Upsample_Arbitrary(SDL_AudioCVT *cvt, const int channels);
    1.54 +void SDL_Downsample_Arbitrary(SDL_AudioCVT *cvt, const int channels);
    1.55 +void SDL_Upsample_x2(SDL_AudioCVT *cvt, const int channels);
    1.56 +void SDL_Upsample_x4(SDL_AudioCVT *cvt, const int channels);
    1.57 +void SDL_Downsample_Multiple(SDL_AudioCVT *cvt, const int multiple, const int channels);
    1.58  
    1.59  /* vi: set ts=4 sw=4 expandtab: */