![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "darkplaces.h"
#include "snd_main.h"
#include "snd_ogg.h"
#include "snd_wav.h"
#include "sound.h"
Go to the source code of this file.
Data Structures | |
struct | ogg_stream_perchannel_t |
struct | ogg_stream_persfx_t |
struct | ogg_stream_state |
struct | ogg_sync_state |
struct | oggpack_buffer |
struct | OggVorbis_File |
struct | ov_callbacks |
struct | ov_decode_t |
struct | vorbis_block |
struct | vorbis_comment |
struct | vorbis_dsp_state |
struct | vorbis_info |
Functions | |
void | OGG_CloseLibrary (void) |
static void | OGG_DecodeTags (vorbis_comment *vc, unsigned int *start, unsigned int *length, unsigned int numsamples, double *peak, double *gaindb) |
static void | OGG_FreeSfx (sfx_t *sfx) |
static void | OGG_GetSamplesFloat (channel_t *ch, sfx_t *sfx, int firstsampleframe, int numsampleframes, float *outsamplesfloat) |
qbool | OGG_LoadVorbisFile (const char *filename, sfx_t *sfx) |
qbool | OGG_OpenLibrary (void) |
static void | OGG_StopChannel (channel_t *ch) |
static int | ovcb_close (void *ov_decode) |
static size_t | ovcb_read (void *ptr, size_t size, size_t nb, void *datasource) |
static int | ovcb_seek (void *datasource, int64_t offset, int whence) |
static long | ovcb_tell (void *ov_decode) |
Variables | |
static const ov_callbacks | callbacks = {ovcb_read, ovcb_seek, ovcb_close, ovcb_tell} |
static const snd_fetcher_t | ogg_fetcher = {OGG_GetSamplesFloat, OGG_StopChannel, OGG_FreeSfx} |
static int(* | qov_clear )(OggVorbis_File *vf) |
static vorbis_comment *(* | qov_comment )(OggVorbis_File *vf, int link) |
static vorbis_info *(* | qov_info )(OggVorbis_File *vf, int link) |
static int(* | qov_open_callbacks )(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks) |
static int(* | qov_pcm_seek )(OggVorbis_File *vf, int64_t pos) |
static int64_t(* | qov_pcm_total )(OggVorbis_File *vf, int i) |
static long(* | qov_read )(OggVorbis_File *vf, char *buffer, int length, int bigendianp, int word, int sgned, int *bitstream) |
static char *(* | qvorbis_comment_query )(vorbis_comment *vc, const char *tag, int count) |
static dllhandle_t | vf_dll = NULL |
static dllhandle_t | vo_dll = NULL |
static dllfunction_t | vorbisfilefuncs [] |
static dllfunction_t | vorbisfuncs [] |
Definition at line 320 of file snd_ogg.c.
References Sys_FreeLibrary(), vf_dll, and vo_dll.
Referenced by S_Terminate().
|
static |
Definition at line 540 of file snd_ogg.c.
References bound, int(), length, NULL, and qvorbis_comment_query.
Referenced by OGG_LoadVorbisFile().
|
static |
Definition at line 528 of file snd_ogg.c.
References ogg_stream_persfx_t::file, and Mem_Free.
|
static |
Definition at line 418 of file snd_ogg.c.
References ogg_stream_perchannel_t::bs, buf, ogg_stream_perchannel_t::buffer, ov_decode_t::buffer, ogg_stream_perchannel_t::buffer_firstframe, ogg_stream_perchannel_t::buffer_numframes, ov_decode_t::buffsize, callbacks, f, channel_t::fetcher_data, ogg_stream_persfx_t::file, ogg_stream_persfx_t::filesize, i, ov_decode_t::ind, Mem_Alloc, mem_bigendian, Mem_Free, NULL, offset, OGG_GetSamplesFloat(), ogg_stream_perchannel_t::ov_decode, qov_open_callbacks, qov_pcm_seek, qov_read, ret, snd_mempool, and ogg_stream_perchannel_t::vf.
Referenced by OGG_GetSamplesFloat().
qbool OGG_LoadVorbisFile | ( | const char * | filename, |
sfx_t * | sfx ) |
Definition at line 598 of file snd_ogg.c.
References ov_decode_t::buffer, ov_decode_t::buffsize, callbacks, vorbis_info::channels, Con_Printf(), data, developer_loading, ogg_stream_persfx_t::file, ogg_stream_persfx_t::filesize, FS_LoadFile(), ov_decode_t::ind, cvar_t::integer, log(), max, Mem_Alloc, mem_bigendian, Mem_Free, min, NULL, OGG_DecodeTags(), ogg_fetcher, qov_clear, qov_comment, qov_info, qov_open_callbacks, qov_pcm_total, qov_read, vorbis_info::rate, ret, SFXFLAG_STREAMED, snd_mempool, snd_streaming, snd_streaming_length, cvar_t::value, vf_dll, and wav_fetcher.
Referenced by S_LoadSound().
Definition at line 267 of file snd_ogg.c.
References NULL, Sys_CheckParm(), Sys_LoadDependency(), vf_dll, vo_dll, vorbisfilefuncs, and vorbisfuncs.
Referenced by S_Init().
Definition at line 511 of file snd_ogg.c.
References channel_t::fetcher_data, Mem_Free, NULL, qov_clear, and ogg_stream_perchannel_t::vf.
Definition at line 342 of file snd_ogg.c.
References ov_decode_t::buffer, ov_decode_t::buffsize, ov_decode_t::ind, and size.
Definition at line 358 of file snd_ogg.c.
References ov_decode_t::buffsize, ov_decode_t::ind, and offset.
|
static |
|
static |
Definition at line 411 of file snd_ogg.c.
Referenced by OGG_GetSamplesFloat(), and OGG_LoadVorbisFile().
|
static |
|
static |
Definition at line 217 of file snd_ogg.c.
Referenced by OGG_LoadVorbisFile(), and OGG_StopChannel().
|
static |
Definition at line 219 of file snd_ogg.c.
Referenced by OGG_LoadVorbisFile().
|
static |
Definition at line 218 of file snd_ogg.c.
Referenced by OGG_LoadVorbisFile().
|
static |
Definition at line 221 of file snd_ogg.c.
Referenced by OGG_GetSamplesFloat(), and OGG_LoadVorbisFile().
|
static |
Definition at line 224 of file snd_ogg.c.
Referenced by OGG_GetSamplesFloat().
|
static |
Definition at line 225 of file snd_ogg.c.
Referenced by OGG_LoadVorbisFile().
|
static |
Definition at line 226 of file snd_ogg.c.
Referenced by OGG_GetSamplesFloat(), and OGG_LoadVorbisFile().
|
static |
Definition at line 220 of file snd_ogg.c.
Referenced by OGG_DecodeTags().
|
static |
Definition at line 249 of file snd_ogg.c.
Referenced by OGG_CloseLibrary(), OGG_LoadVorbisFile(), and OGG_OpenLibrary().
|
static |
Definition at line 248 of file snd_ogg.c.
Referenced by OGG_CloseLibrary(), and OGG_OpenLibrary().
|
static |
Definition at line 229 of file snd_ogg.c.
Referenced by OGG_OpenLibrary().
|
static |
Definition at line 241 of file snd_ogg.c.
Referenced by OGG_OpenLibrary().