25#ifndef __DC_SOUND_STREAM_H
26#define __DC_SOUND_STREAM_H
40#define SND_STREAM_MAX 4
43#define SND_STREAM_BUFFER_MAX 0x10000
57#define SND_STREAM_INVALID -1
87 uintptr_t left, uintptr_t right,
size_t size_req);
148 int channels,
void **buffer,
void snd_stream_start(snd_stream_hnd_t hnd, uint32 freq, int st)
Start a 16-bit PCM stream.
int snd_stream_poll(snd_stream_hnd_t hnd)
Poll a stream.
void snd_stream_set_callback_direct(snd_stream_hnd_t hnd, snd_stream_callback_direct_t cb)
Set the callback for a given stream with direct transfer.
void snd_stream_stop(snd_stream_hnd_t hnd)
Stop a stream.
void snd_stream_queue_disable(snd_stream_hnd_t hnd)
Disable queueing on a stream.
void snd_stream_start_pcm8(snd_stream_hnd_t hnd, uint32 freq, int st)
Start a 8-bit PCM stream.
int snd_stream_init(void)
Initialize the stream system.
size_t(* snd_stream_callback_direct_t)(snd_stream_hnd_t hnd, uintptr_t left, uintptr_t right, size_t size_req)
Direct stream data transfer callback type.
Definition stream.h:86
void snd_stream_volume(snd_stream_hnd_t hnd, int vol)
Set the volume on the stream.
void snd_stream_filter_remove(snd_stream_hnd_t hnd, snd_stream_filter_t filtfunc, void *obj)
Remove a filter from the specified stream.
int snd_stream_hnd_t
Stream handle type.
Definition stream.h:51
void snd_stream_set_callback(snd_stream_hnd_t hnd, snd_stream_callback_t cb)
Set the callback for a given stream.
void *(* snd_stream_callback_t)(snd_stream_hnd_t hnd, int smp_req, int *smp_recv)
Stream get data callback type.
Definition stream.h:71
snd_stream_hnd_t snd_stream_alloc(snd_stream_callback_t cb, int bufsize)
Allocate a stream.
void snd_stream_set_userdata(snd_stream_hnd_t hnd, void *d)
Set the user data for a given stream.
void snd_stream_destroy(snd_stream_hnd_t hnd)
Destroy a stream.
int snd_stream_reinit(snd_stream_hnd_t hnd, snd_stream_callback_t cb)
Reinitialize a stream.
void snd_stream_filter_add(snd_stream_hnd_t hnd, snd_stream_filter_t filtfunc, void *obj)
Add a filter to the specified stream.
void snd_stream_shutdown(void)
Shut down the stream system.
void snd_stream_pan(snd_stream_hnd_t hnd, int left_pan, int right_pan)
Set the panning on the stream.
void snd_stream_queue_go(snd_stream_hnd_t hnd)
Start a stream after queueing the request.
void snd_stream_prefill(snd_stream_hnd_t hnd)
Prefill the stream buffers.
void * snd_stream_get_userdata(snd_stream_hnd_t hnd)
Get the user data for a given stream.
void snd_stream_start_adpcm(snd_stream_hnd_t hnd, uint32 freq, int st)
Start a 4-bit ADPCM stream.
void(* snd_stream_filter_t)(snd_stream_hnd_t hnd, void *obj, int hz, int channels, void **buffer, int *samplecnt)
Stream filter callback type.
Definition stream.h:147
void snd_stream_queue_enable(snd_stream_hnd_t hnd)
Enable queueing on a stream.
int snd_stream_init_ex(int channels, size_t buffer_size)
Initialize the stream system with limits.
unsigned long uint32
32-bit unsigned integer
Definition types.h:33