Buffer for storing sound samples in memory. More...
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_t * | paint |
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_t * | sfx |
owning sfx_t instance More... | |
unsigned | tail |
ring buffer tail position in sampels More... | |
Buffer for storing sound samples in memory.
For cached sounds, acts as an ordinary buffer. For streamed sounds, acts as a ring buffer.
int(* advance)(sfxbuffer_t *buffer, unsigned int count) |
Advance the position with the stream, updating the ring buffer as necessary.
Null for chached sounds.
buffer | "this" |
count | number of frames to advance |
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.
buffer | "this" |
pos | frame position with the stream |
sfx_t* sfx |
owning sfx_t instance
unsigned tail |
ring buffer tail position in sampels