12#ifndef __AUDIO_SAMPLE_PLAYBACK_H__
13#define __AUDIO_SAMPLE_PLAYBACK_H__
62#define sample_playback_init( \
63 self, _buf, _buf_size, _channels, _vol, _start_offset) \
66 g_critical ("channels: %u", _channels); \
69 (self)->buf_size = _buf_size; \
70 (self)->volume = _vol; \
72 (self)->channels = _channels; \
73 (self)->start_offset = _start_offset; \
74 (self)->file = __FILE__; \
75 (self)->func = __func__; \
76 (self)->lineno = __LINE__
uint_fast64_t unsigned_frame_t
Unsigned type for frame index.
uint32_t nframes_t
Frame count.
float sample_t
The sample type.
unsigned int channels_t
Number of channels.
A sample playback handle to be used by the engine.
float volume
The volume to play the sample at (ratio from 0.0 to 2.0, where 1.0 is the normal volume).
int lineno
Line no initialized from.
const char * file
Source file initialized from.
channels_t channels
The number of channels.
unsigned_frame_t buf_size
The number of frames in the buffer.
unsigned_frame_t offset
The current offset in the buffer.
const char * func
Function initialized from.
sample_t ** buf
A pointer to the original buffer.
nframes_t start_offset
Offset relative to the current processing cycle to start playing the sample.