Mercurial > SDL_sound_CoreAudio
comparison SDL_sound_internal.h @ 485:137c0b00ea4c
Added Sound_NewSampleFromMem(), and implementation of RWops pooling.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 27 Feb 2005 19:53:25 +0000 |
parents | 9e761a594df1 |
children | 2df1f5c62d38 |
comparison
equal
deleted
inserted
replaced
484:1c09756bc038 | 485:137c0b00ea4c |
---|---|
61 | 61 |
62 | 62 |
63 #if (!defined assert) /* if all else fails. */ | 63 #if (!defined assert) /* if all else fails. */ |
64 # define assert(x) | 64 # define assert(x) |
65 #endif | 65 #endif |
66 | |
67 | |
68 /* | |
69 * SDL itself only supports mono and stereo output, but hopefully we can | |
70 * raise this value someday...there's probably a lot of assumptions in | |
71 * SDL_sound that rely on it, though. | |
72 */ | |
73 #define MAX_CHANNELS 2 | |
66 | 74 |
67 | 75 |
68 typedef struct __SOUND_DECODERFUNCTIONS__ | 76 typedef struct __SOUND_DECODERFUNCTIONS__ |
69 { | 77 { |
70 /* This is a block of info about your decoder. See SDL_sound.h. */ | 78 /* This is a block of info about your decoder. See SDL_sound.h. */ |
238 Uint32 dst_size); | 246 Uint32 dst_size); |
239 | 247 |
240 extern SNDDECLSPEC int Sound_ConvertAudio(Sound_AudioCVT *cvt); | 248 extern SNDDECLSPEC int Sound_ConvertAudio(Sound_AudioCVT *cvt); |
241 | 249 |
242 | 250 |
251 typedef void (*MixFunc)(float *dst, void *src, Uint32 frames, float *gains); | |
243 | 252 |
244 typedef struct __SOUND_SAMPLEINTERNAL__ | 253 typedef struct __SOUND_SAMPLEINTERNAL__ |
245 { | 254 { |
246 Sound_Sample *next; | 255 Sound_Sample *next; |
247 Sound_Sample *prev; | 256 Sound_Sample *prev; |
250 Sound_AudioCVT sdlcvt; | 259 Sound_AudioCVT sdlcvt; |
251 void *buffer; | 260 void *buffer; |
252 Uint32 buffer_size; | 261 Uint32 buffer_size; |
253 void *decoder_private; | 262 void *decoder_private; |
254 Sint32 total_time; | 263 Sint32 total_time; |
264 Uint32 mix_position; | |
265 MixFunc mix; | |
255 } Sound_SampleInternal; | 266 } Sound_SampleInternal; |
256 | 267 |
257 | 268 |
258 /* error messages... */ | 269 /* error messages... */ |
259 #define ERR_IS_INITIALIZED "Already initialized" | 270 #define ERR_IS_INITIALIZED "Already initialized" |