DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
snd_xmp.h File Reference
#include "qtypes.h"
+ Include dependency graph for snd_xmp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void XMP_CloseLibrary (void)
 
qbool XMP_LoadModFile (const char *filename, struct sfx_s *sfx)
 
qbool XMP_OpenLibrary (void)
 

Function Documentation

◆ XMP_CloseLibrary()

void XMP_CloseLibrary ( void )

Definition at line 398 of file snd_xmp.c.

399{
401}
static dllhandle_t xmp_dll
Definition snd_xmp.c:331
void Sys_FreeLibrary(dllhandle_t *handle)
Definition sys_shared.c:245

References Sys_FreeLibrary(), and xmp_dll.

Referenced by S_Terminate().

◆ XMP_LoadModFile()

qbool XMP_LoadModFile ( const char * filename,
struct sfx_s * sfx )

◆ XMP_OpenLibrary()

qbool XMP_OpenLibrary ( void )

Definition at line 349 of file snd_xmp.c.

350{
351 const char* dllnames_xmp [] =
352 {
353#if defined(WIN32)
354 "libxmp-4.dll",
355 "libxmp.dll",
356#elif defined(MACOSX) // FIXME: untested, please test a mac os build
357 "libxmp.4.dylib",
358 "libxmp.dylib",
359#else
360 "libxmp.so.4",
361 "libxmp.so",
362#endif
363 NULL
364 };
365
366 if (xmp_dll) // Already loaded?
367 return true;
368
369// COMMANDLINEOPTION: Sound: -noxmp disables xmp module sound support
370 if (Sys_CheckParm("-noxmp"))
371 return false;
372
373 // Load the DLL
374 if (Sys_LoadDependency (dllnames_xmp, &xmp_dll, xmpfuncs))
375 {
376 if (*qxmp_vercode < 0x040200)
377 {
378 Con_Printf("Found incompatible XMP library version %s, not loading. (4.2.0 or higher required)\n", *qxmp_version);
380 return false;
381 }
382 if (developer_loading.integer >= 1)
383 Con_Printf("XMP library loaded, version %s (0x0%x)\n", *qxmp_version, *qxmp_vercode);
384 return true;
385 }
386 else
387 return false;
388}
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
Definition console.c:1514
cvar_t developer_loading
Definition host.c:52
#define NULL
Definition qtypes.h:12
static const unsigned int * qxmp_vercode
Definition snd_xmp.c:144
static const char ** qxmp_version
Definition snd_xmp.c:143
static dllfunction_t xmpfuncs[]
Definition snd_xmp.c:281
int integer
Definition cvar.h:73
qbool Sys_LoadDependency(const char **dllnames, dllhandle_t *handle, const dllfunction_t *fcts)
Definition sys_shared.c:131
int Sys_CheckParm(const char *parm)
Definition sys_shared.c:327

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().