audio: libsamplerate loading now happens once at init time.

This commit is contained in:
Ryan C. Gordon 2017-01-08 14:18:03 -05:00
parent 98cc9d10d3
commit 19e937fc2e
3 changed files with 100 additions and 59 deletions

View file

@ -36,6 +36,16 @@
/* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */
#ifdef HAVE_LIBSAMPLERATE_H
extern SDL_bool SRC_available;
typedef struct SRC_STATE SRC_STATE;
extern SRC_STATE* (*SRC_src_new)(int converter_type, int channels, int *error);
extern int (*SRC_src_process)(SRC_STATE *state, SRC_DATA *data);
extern int (*SRC_src_reset)(SRC_STATE *state);
extern SRC_STATE* (*SRC_src_delete)(SRC_STATE *state);
extern const char* (*SRC_src_strerror)(int error);
#endif
/* Functions to get a list of "close" audio formats */
extern SDL_AudioFormat SDL_FirstAudioFormat(SDL_AudioFormat format);
extern SDL_AudioFormat SDL_NextAudioFormat(void);