![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Data Structures | |
struct | xmp_channel |
struct | xmp_module |
struct | xmp_module_info |
struct | xmp_stream_perchannel_t |
struct | xmp_stream_persfx_t |
Macros | |
#define | XMP_CHANNEL_MUTE (1 << 1) /* Channel is muted */ |
#define | XMP_CHANNEL_SYNTH (1 << 0) /* Channel is synthesized */ |
#define | XMP_END 1 |
#define | XMP_ERROR_DEPACK 5 /* Error depacking file */ |
#define | XMP_ERROR_FORMAT 3 /* Unsupported module format */ |
#define | XMP_ERROR_INTERNAL 2 /* Internal error */ |
#define | XMP_ERROR_INVALID 7 /* Invalid parameter */ |
#define | XMP_ERROR_LOAD 4 /* Error loading file */ |
#define | XMP_ERROR_STATE 8 /* Invalid player state */ |
#define | XMP_ERROR_SYSTEM 6 /* System error */ |
#define | XMP_FORMAT_8BIT (1 << 0) /* Mix to 8-bit instead of 16 */ |
#define | XMP_FORMAT_MONO (1 << 2) /* Mix to mono instead of stereo */ |
#define | XMP_FORMAT_UNSIGNED (1 << 1) /* Mix to unsigned samples */ |
#define | XMP_INTERP_LINEAR 1 /* Linear (default) */ |
#define | XMP_INTERP_NEAREST 0 /* Nearest neighbor */ |
#define | XMP_INTERP_SPLINE 2 /* Cubic spline */ |
#define | XMP_MAX_FRAMESIZE (5 * XMP_MAX_SRATE * 2 / XMP_MIN_BPM) |
#define | XMP_MAX_MOD_LENGTH 256 /* Max number of patterns in module */ |
#define | XMP_MAX_SRATE 49170 /* max sampling rate (Hz) */ |
#define | XMP_MIN_SRATE 4000 /* min sampling rate (Hz) */ |
#define | XMP_NAME_SIZE 64 /* Size of module name and type */ |
#define | XMP_PLAYER_AMP 0 /* Amplification factor */ |
#define | XMP_PLAYER_CFLAGS 5 /* Player flags for current module */ |
#define | XMP_PLAYER_DEFPAN 10 /* Default pan setting */ |
#define | XMP_PLAYER_DSP 3 /* DSP effect flags */ |
#define | XMP_PLAYER_FLAGS 4 /* Player flags */ |
#define | XMP_PLAYER_INTERP 2 /* Interpolation type */ |
#define | XMP_PLAYER_MIX 1 /* Stereo mixing */ |
#define | XMP_PLAYER_SMIX_VOLUME 9 /* SMIX volume */ |
#define | XMP_PLAYER_SMPCTL 6 /* Sample control flags */ |
#define | XMP_PLAYER_STATE 8 /* Internal player state */ |
#define | XMP_PLAYER_VOLUME 7 /* Player module volume */ |
#define | XMP_SMPCTL_SKIP (1 << 0) /* Don't load samples */ |
#define | XMP_STATE_LOADED 1 /* Module loaded */ |
#define | XMP_STATE_PLAYING 2 /* Module playing */ |
#define | XMP_STATE_UNLOADED 0 /* Context created */ |
Typedefs | |
typedef char * | xmp_context |
Functions | |
void | XMP_CloseLibrary (void) |
static void | XMP_FreeSfx (sfx_t *sfx) |
static void | XMP_GetSamplesFloat (channel_t *ch, sfx_t *sfx, int firstsampleframe, int numsampleframes, float *outsamplesfloat) |
qbool | XMP_LoadModFile (const char *filename, sfx_t *sfx) |
qbool | XMP_OpenLibrary (void) |
static void | XMP_StopChannel (channel_t *ch) |
Variables | |
static xmp_context(* | qxmp_create_context )(void) |
static void(* | qxmp_end_player )(xmp_context) |
static void(* | qxmp_free_context )(xmp_context) |
static void(* | qxmp_get_frame_info )(xmp_context, struct xmp_frame_info *) |
static void(* | qxmp_get_module_info )(xmp_context, struct xmp_module_info *) |
static int(* | qxmp_get_player )(xmp_context, int) |
static int(* | qxmp_load_module_from_memory )(xmp_context, void *, long) |
static int(* | qxmp_play_buffer )(xmp_context, void *, int, int) |
static int(* | qxmp_play_frame )(xmp_context) |
static void(* | qxmp_release_module )(xmp_context) |
static int(* | qxmp_set_player )(xmp_context, int, int) |
static int(* | qxmp_start_player )(xmp_context, int, int) |
static const unsigned int * | qxmp_vercode |
static const char ** | qxmp_version |
static dllhandle_t | xmp_dll = NULL |
static const snd_fetcher_t | xmp_fetcher = { XMP_GetSamplesFloat, XMP_StopChannel, XMP_FreeSfx } |
static dllfunction_t | xmpfuncs [] |
#define XMP_CHANNEL_SYNTH (1 << 0) /* Channel is synthesized */ |
#define XMP_ERROR_FORMAT 3 /* Unsupported module format */ |
#define XMP_FORMAT_8BIT (1 << 0) /* Mix to 8-bit instead of 16 */ |
Definition at line 90 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
#define XMP_FORMAT_MONO (1 << 2) /* Mix to mono instead of stereo */ |
Definition at line 92 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
#define XMP_FORMAT_UNSIGNED (1 << 1) /* Mix to unsigned samples */ |
Definition at line 91 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
#define XMP_INTERP_SPLINE 2 /* Cubic spline */ |
Definition at line 110 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
#define XMP_MAX_FRAMESIZE (5 * XMP_MAX_SRATE * 2 / XMP_MIN_BPM) |
#define XMP_MAX_MOD_LENGTH 256 /* Max number of patterns in module */ |
#define XMP_MAX_SRATE 49170 /* max sampling rate (Hz) */ |
Definition at line 125 of file snd_xmp.c.
Referenced by XMP_LoadModFile().
#define XMP_MIN_SRATE 4000 /* min sampling rate (Hz) */ |
Definition at line 126 of file snd_xmp.c.
Referenced by XMP_LoadModFile().
#define XMP_PLAYER_INTERP 2 /* Interpolation type */ |
Definition at line 97 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
#define XMP_PLAYER_MIX 1 /* Stereo mixing */ |
Definition at line 96 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
typedef char* xmp_context |
Definition at line 398 of file snd_xmp.c.
References Sys_FreeLibrary(), and xmp_dll.
Referenced by S_Terminate().
|
static |
Definition at line 578 of file snd_xmp.c.
References xmp_stream_persfx_t::file, and Mem_Free.
|
static |
Definition at line 436 of file snd_xmp.c.
References xmp_stream_perchannel_t::bs, buf, xmp_stream_perchannel_t::buffer, xmp_stream_perchannel_t::buffer_firstframe, xmp_stream_perchannel_t::buffer_numframes, f, channel_t::fetcher_data, xmp_stream_persfx_t::file, xmp_stream_persfx_t::filesize, format, i, int(), Mem_Alloc, Mem_Free, NULL, offset, xmp_stream_perchannel_t::playercontext, qxmp_create_context, qxmp_free_context, qxmp_load_module_from_memory, qxmp_play_buffer, qxmp_set_player, qxmp_start_player, snd_mempool, XMP_FORMAT_8BIT, XMP_FORMAT_MONO, XMP_FORMAT_UNSIGNED, XMP_GetSamplesFloat(), XMP_INTERP_SPLINE, XMP_PLAYER_INTERP, and XMP_PLAYER_MIX.
Referenced by XMP_GetSamplesFloat().
qbool XMP_LoadModFile | ( | const char * | filename, |
sfx_t * | sfx ) |
Definition at line 596 of file snd_xmp.c.
References xmp_module::bpm, xmp_module::chn, Con_Printf(), data, developer_loading, xmp_stream_persfx_t::file, xmp_stream_persfx_t::filesize, FS_LoadFile(), xmp_module::gvl, xmp_module::ins, cvar_t::integer, xmp_module::len, Mem_Alloc, Mem_Free, xmp_module_info::mod, xmp_module::name, NULL, xmp_module::pat, qxmp_create_context, qxmp_free_context, qxmp_get_module_info, qxmp_load_module_from_memory, xmp_module::rst, S_GetSoundChannels(), S_GetSoundRate(), S_GetSoundWidth(), SFXFLAG_STREAMED, xmp_module::smp, snd_mempool, xmp_module::spd, Sys_CheckParm(), xmp_module::type, xmp_dll, xmp_fetcher, XMP_MAX_SRATE, and XMP_MIN_SRATE.
Referenced by S_LoadSound().
Definition at line 349 of file snd_xmp.c.
References Con_Printf(), developer_loading, cvar_t::integer, NULL, qxmp_vercode, qxmp_version, Sys_CheckParm(), Sys_FreeLibrary(), Sys_LoadDependency(), xmp_dll, and xmpfuncs.
Referenced by S_Init().
Definition at line 558 of file snd_xmp.c.
References channel_t::fetcher_data, Mem_Free, NULL, xmp_stream_perchannel_t::playercontext, qxmp_end_player, qxmp_free_context, and qxmp_release_module.
|
static |
Definition at line 232 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat(), and XMP_LoadModFile().
|
static |
Definition at line 242 of file snd_xmp.c.
Referenced by XMP_StopChannel().
|
static |
Definition at line 233 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat(), XMP_LoadModFile(), and XMP_StopChannel().
|
static |
|
static |
Definition at line 244 of file snd_xmp.c.
Referenced by XMP_LoadModFile().
|
static |
|
static |
Definition at line 257 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat(), and XMP_LoadModFile().
|
static |
Definition at line 240 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
|
static |
|
static |
Definition at line 237 of file snd_xmp.c.
Referenced by XMP_StopChannel().
|
static |
Definition at line 254 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
|
static |
Definition at line 238 of file snd_xmp.c.
Referenced by XMP_GetSamplesFloat().
|
static |
Definition at line 144 of file snd_xmp.c.
Referenced by XMP_OpenLibrary().
|
static |
Definition at line 143 of file snd_xmp.c.
Referenced by XMP_OpenLibrary().
|
static |
Definition at line 331 of file snd_xmp.c.
Referenced by XMP_CloseLibrary(), XMP_LoadModFile(), and XMP_OpenLibrary().
|
static |
|
static |
Definition at line 281 of file snd_xmp.c.
Referenced by XMP_OpenLibrary().