QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Functions

sfxbuffer_tSND_CacheGetBuffer (sfx_t *sfx)
 Get the pointer to the sound buffer. More...
 
void SND_CacheRelease (sfx_t *sfx)
 Unlock a cached sound from memory. More...
 
sfxbuffer_tSND_CacheRetain (sfx_t *sfx)
 Lock a cached sound into memory. More...
 
sfxbuffer_tSND_CacheTouch (sfx_t *sfx)
 Ensure a cached sound is in memory. More...
 
wavinfo_tSND_CacheWavinfo (sfx_t *sfx)
 Retrieve wavinfo from a cached sound. More...
 
sfxbuffer_tSND_GetCache (long samples, int rate, int channels, sfxblock_t *block, cache_allocator_t allocator)
 Allocate a sound buffer from cache for cached sounds. More...
 
int SND_StreamAdvance (sfxbuffer_t *buffer, unsigned int count)
 Advance the position with the stream, updating the ring buffer as necessary. More...
 
sfxbuffer_tSND_StreamGetBuffer (sfx_t *sfx)
 Get the pointer to the sound buffer. More...
 
void SND_StreamRelease (sfx_t *sfx)
 Unlock a streamed sound from memory. More...
 
sfxbuffer_tSND_StreamRetain (sfx_t *sfx)
 Lock a streamed sound into memory. More...
 
void SND_StreamSetPos (sfxbuffer_t *buffer, unsigned int pos)
 Seek to an absolute position within the stream, resetting the ring buffer. More...
 
wavinfo_tSND_StreamWavinfo (sfx_t *sfx)
 Retrieve wavinfo from a streamed sound. More...
 

Detailed Description

Function Documentation

sfxbuffer_t* SND_CacheGetBuffer ( sfx_t sfx)

Get the pointer to the sound buffer.

Parameters
sfxsound reference
Returns
sound buffer or null
Note
The sound must be retained with SND_CacheRetain() for the returned buffer to be valid.
void SND_CacheRelease ( sfx_t sfx)

Unlock a cached sound from memory.

After calling this, SND_CacheGetBffer() will return a null buffer.

Parameters
sfxsound reference
sfxbuffer_t* SND_CacheRetain ( sfx_t sfx)

Lock a cached sound into memory.

After calling this, SND_CacheGetBffer() will return a valid buffer.

Parameters
sfxsound reference
Returns
poitner to sound buffer
sfxbuffer_t* SND_CacheTouch ( sfx_t sfx)

Ensure a cached sound is in memory.

Parameters
sfxsound reference
Returns
poitner to sound buffer
wavinfo_t* SND_CacheWavinfo ( sfx_t sfx)

Retrieve wavinfo from a cached sound.

Parameters
sfxsound reference
Returns
pointer to sound's wavinfo
sfxbuffer_t* SND_GetCache ( long  samples,
int  rate,
int  channels,
sfxblock_t block,
cache_allocator_t  allocator 
)

Allocate a sound buffer from cache for cached sounds.

Parameters
samplessize in samples
ratesample rate
channelsnumber of channels in input data
blockcached sound descriptor to initialize
allocatorcache allocator function
Returns
pointer to sound sample buffer (setup for block mode)
int SND_StreamAdvance ( sfxbuffer_t buffer,
unsigned int  count 
)

Advance the position with the stream, updating the ring buffer as necessary.

Null for chached sounds.

Parameters
buffer"this"
countnumber of samples to advance
sfxbuffer_t* SND_StreamGetBuffer ( sfx_t sfx)

Get the pointer to the sound buffer.

Parameters
sfxsound reference
Returns
poitner to sound buffer
void SND_StreamRelease ( sfx_t sfx)

Unlock a streamed sound from memory.

Doesn't actually do anything.

Parameters
sfxsound reference
sfxbuffer_t* SND_StreamRetain ( sfx_t sfx)

Lock a streamed sound into memory.

Doesn't actually do anything other than return a pointer to the buffer.

Parameters
sfxsound reference
Returns
poitner to sound buffer
void SND_StreamSetPos ( sfxbuffer_t buffer,
unsigned int  pos 
)

Seek to an absolute position within the stream, resetting the ring buffer.

Parameters
buffer"this"
possample position with the stream
wavinfo_t* SND_StreamWavinfo ( sfx_t sfx)

Retrieve wavinfo from a streamed sound.

Parameters
sfxsound reference
Returns
pointer to sound's wavinfo