-
-/*
-=================================================================
-
- DLL load & unload
-
-=================================================================
-*/
-
-/*
-====================
-OGG_OpenLibrary
-
-Try to load the VorbisFile DLL
-====================
-*/
-qboolean OGG_OpenLibrary (void)
-{
- const char* dllname;
-
- // Already loaded?
- if (vf_dll)
- return true;
-
-// COMMANDLINEOPTION: -novorbis disables ogg vorbis sound support
- if (COM_CheckParm("-novorbis"))
- return false;
-
-#ifdef WIN32
- dllname = "vorbisfile.dll";
-#else
- dllname = "libvorbisfile.so";
-#endif
-
- // Load the DLL
- if (! Sys_LoadLibrary (dllname, &vf_dll, oggvorbisfuncs))
- {
- Con_Printf ("Ogg Vorbis support disabled\n");
- return false;
- }
-
- Con_Printf ("Ogg Vorbis support enabled\n");
- return true;
-}
-
-
-/*
-====================
-OGG_CloseLibrary
-
-Unload the VorbisFile DLL
-====================
-*/
-void OGG_CloseLibrary (void)
-{
- Sys_UnloadLibrary (&vf_dll);
-}
-
-
-/*
-=================================================================
-
- Ogg Vorbis decoding
-
-=================================================================
-*/
-
-#define STREAM_BUFFER_DURATION 1.5f // 1.5 sec
-
-// We work with 1 sec sequences, so this buffer must be able to contain
-// 1 sec of sound of the highest quality (48 KHz, 16 bit samples, stereo)
-static qbyte resampling_buffer [48000 * 2 * 2];
-
-