diff options
Diffstat (limited to 'audio/stream.c')
-rw-r--r-- | audio/stream.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/audio/stream.c b/audio/stream.c deleted file mode 100644 index c68d8919..00000000 --- a/audio/stream.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "main.h" - -void stream_audio(void *unused, Uint8 *stream, int len) { - int i=0; - unsigned long size; - - for(;i<MAX_VOICES;i++) { - if(voices[i].isplaying) { - if(voices[i].play_position>=voices[i].voice->len) - voices[i].isplaying=0; - - size=(voices[i].voice->len)-(voices[i].play_position); //amount left of the sample to play - if(size>len) size=len; //clip to the audio buffer size - - //mix each playing voice into the audio stream len bytes at a time - SDL_MixAudio(stream,&voices[i].voice->data[voices[i].play_position],size,SDL_MIX_MAXVOLUME); - voices[i].play_position+=size; - } - } -} |