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

Go to the source code of this file.

Functions

void OGG_CloseLibrary (void)
 
qbool OGG_LoadVorbisFile (const char *filename, struct sfx_s *sfx)
 
qbool OGG_OpenLibrary (void)
 

Function Documentation

◆ OGG_CloseLibrary()

void OGG_CloseLibrary ( void )

Definition at line 320 of file snd_ogg.c.

321{
324}
static dllhandle_t vf_dll
Definition snd_ogg.c:249
static dllhandle_t vo_dll
Definition snd_ogg.c:248
void Sys_FreeLibrary(dllhandle_t *handle)
Definition sys_shared.c:245

References Sys_FreeLibrary(), vf_dll, and vo_dll.

Referenced by S_Terminate().

◆ OGG_LoadVorbisFile()

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

◆ OGG_OpenLibrary()

qbool OGG_OpenLibrary ( void )

Definition at line 267 of file snd_ogg.c.

268{
269 const char* dllnames_vo [] =
270 {
271#if defined(WIN32)
272 "libvorbis-0.dll",
273 "libvorbis.dll",
274 "vorbis.dll",
275#elif defined(MACOSX)
276 "libvorbis.dylib",
277#else
278 "libvorbis.so.0",
279 "libvorbis.so",
280#endif
281 NULL
282 };
283 const char* dllnames_vf [] =
284 {
285#if defined(WIN32)
286 "libvorbisfile-3.dll",
287 "libvorbisfile.dll",
288 "vorbisfile.dll",
289#elif defined(MACOSX)
290 "libvorbisfile.dylib",
291#else
292 "libvorbisfile.so.3",
293 "libvorbisfile.so",
294#endif
295 NULL
296 };
297
298 // Already loaded?
299 if (vf_dll)
300 return true;
301
302// COMMANDLINEOPTION: Sound: -novorbis disables ogg vorbis sound support
303 if (Sys_CheckParm("-novorbis"))
304 return false;
305
306 // Load the DLLs
307 // We need to load both by hand because some OSes seem to not load
308 // the vorbis DLL automatically when loading the VorbisFile DLL
309 return Sys_LoadDependency (dllnames_vo, &vo_dll, vorbisfuncs) && Sys_LoadDependency (dllnames_vf, &vf_dll, vorbisfilefuncs);
310}
#define NULL
Definition qtypes.h:12
static dllfunction_t vorbisfuncs[]
Definition snd_ogg.c:241
static dllfunction_t vorbisfilefuncs[]
Definition snd_ogg.c:229
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 NULL, Sys_CheckParm(), Sys_LoadDependency(), vf_dll, vo_dll, vorbisfilefuncs, and vorbisfuncs.

Referenced by S_Init().