0
0
Fork 0
mirror of https://github.com/ZDoom/gzdoom-gles.git synced 2024-12-14 22:31:57 +00:00
gzdoom-gles/libraries/zmusic/decoder/sndload.h
Christoph Oelckers f3f2ec5cb1 - moved the sound decoding code to the zmusic project.
Since this gets used by both the sound backend and the music code it needs to be in a place accessible to both.

# Conflicts:
#	src/CMakeLists.txt

# Conflicts:
#	libraries/zmusic/decoder/mpg123_decoder.cpp
#	libraries/zmusic/decoder/sndfile_decoder.cpp
#	src/CMakeLists.txt
2020-01-05 12:29:15 +01:00

23 lines
719 B
C

#ifndef SNDDEF_H
#define SNDDEF_H
#if defined HAVE_SNDFILE && defined DYN_SNDFILE
#define DEFINE_ENTRY(type, name) static TReqProc<SndFileModule, type> p_##name{#name};
DEFINE_ENTRY(int (*)(SNDFILE *sndfile), sf_close)
DEFINE_ENTRY(SNDFILE* (*)(SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data), sf_open_virtual)
DEFINE_ENTRY(sf_count_t (*)(SNDFILE *sndfile, float *ptr, sf_count_t frames), sf_readf_float)
DEFINE_ENTRY(sf_count_t (*)(SNDFILE *sndfile, sf_count_t frames, int whence), sf_seek)
#undef DEFINE_ENTRY
#ifndef IN_IDE_PARSER
#define sf_close p_sf_close
#define sf_open_virtual p_sf_open_virtual
#define sf_readf_float p_sf_readf_float
#define sf_seek p_sf_seek
#endif
#endif
#endif