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

Buffer for storing sound samples in memory. More...

Collaboration diagram for sfxbuffer_s:
[legend]

Data Fields

int(* advance )(sfxbuffer_t *buffer, unsigned int count)
 Advance the position with the stream, updating the ring buffer as necessary. More...
 
unsigned channels
 number of channels per frame More...
 
float data [1]
 Sample data. More...
 
unsigned head
 ring buffer head position in sampels More...
 
unsigned length
 length of buffer in frames More...
 
sfxpaint_tpaint
 channel count specific paint function More...
 
unsigned pos
 position of tail within full stream More...
 
void(* setpos )(sfxbuffer_t *buffer, unsigned int pos)
 Seek to an absolute position within the stream, resetting the ring buffer. More...
 
sfx_tsfx
 owning sfx_t instance More...
 
unsigned tail
 ring buffer tail position in sampels More...
 

Detailed Description

Buffer for storing sound samples in memory.

For cached sounds, acts as an ordinary buffer. For streamed sounds, acts as a ring buffer.

Field Documentation

int(* advance)(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 frames to advance
Returns
true for success, false if an error occured
unsigned channels

number of channels per frame

float data[1]

Sample data.

The block at the beginning of the buffer (size depends on sample size)

unsigned head

ring buffer head position in sampels

unsigned length

length of buffer in frames

sfxpaint_t* paint

channel count specific paint function

unsigned pos

position of tail within full stream

void(* setpos)(sfxbuffer_t *buffer, unsigned int pos)

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

Parameters
buffer"this"
posframe position with the stream
sfx_t* sfx

owning sfx_t instance

unsigned tail

ring buffer tail position in sampels


The documentation for this struct was generated from the following file: