16 #ifndef INC_C4SoundLoaders
17 #define INC_C4SoundLoaders
30 #if AUDIO_TK == AUDIO_TK_OPENAL
54 #if AUDIO_TK == AUDIO_TK_OPENAL && defined(__APPLE__)
59 virtual bool ReadInfo(SoundInfo* result,
BYTE* data,
size_t data_length, uint32_t);
61 static AppleSoundLoader singleton;
65 #if AUDIO_TK == AUDIO_TK_OPENAL
85 static size_t mem_read_func(
void* ptr,
size_t byte_size,
size_t size_to_read,
void* datasource);
86 static int mem_seek_func(
void* datasource, ogg_int64_t offset,
int whence);
90 static size_t file_read_func(
void* ptr,
size_t byte_size,
size_t size_to_read,
void* datasource);
91 static int file_seek_func(
void* datasource, ogg_int64_t offset,
int whence);
110 #elif AUDIO_TK == AUDIO_TK_SDL_MIXER
114 static SDLMixerSoundLoader singleton;
115 bool ReadInfo(
SoundInfo* result,
BYTE* data,
size_t data_length, uint32_t)
override;
struct Mix_Chunk * C4SoundHandle
static SoundLoader * first_loader
virtual bool ReadInfo(SoundInfo *info, BYTE *data, size_t data_length, uint32_t options=0)=0
virtual ~SoundLoader()=default
static const int OPTION_Raw
bool ReadInfo(SoundInfo *result, BYTE *data, size_t data_length, uint32_t) override
static VorbisLoader singleton
static long file_tell_func(void *datasource)
static long mem_tell_func(void *datasource)
static int mem_close_func(void *datasource)
static int mem_seek_func(void *datasource, ogg_int64_t offset, int whence)
static int file_close_func(void *datasource)
static size_t file_read_func(void *ptr, size_t byte_size, size_t size_to_read, void *datasource)
static size_t mem_read_func(void *ptr, size_t byte_size, size_t size_to_read, void *datasource)
static int file_seek_func(void *datasource, ogg_int64_t offset, int whence)
static WavLoader singleton
bool ReadInfo(SoundInfo *result, BYTE *data, size_t data_length, uint32_t) override
std::vector< BYTE > sound_data
C4SoundHandle final_handle
void SetOwnedData(BYTE *data, size_t data_length)
CompressedData(BYTE *data, size_t data_length)