src/audio/SDL_audio.c
branchgsoc2008_audio_resampling
changeset 2665 f39a056aec8b
parent 2664 344c8da164f4
child 2666 e12ccc6c9576
--- a/src/audio/SDL_audio.c	Tue Aug 12 00:50:58 2008 +0000
+++ b/src/audio/SDL_audio.c	Tue Aug 12 01:03:05 2008 +0000
@@ -282,7 +282,7 @@
 }
 
 /* Initialize the stream by allocating the buffer and setting the read/write heads to the beginning */
-int SDL_StreamInit(SDL_AudioStreamer * stream, int max_len) {
+int SDL_StreamInit(SDL_AudioStreamer * stream, int max_len, Uint8 silence) {
 	int i;
 
 	/* First try to allocate the buffer */
@@ -297,7 +297,7 @@
 	
 	/* Zero out the buffer */
 	for(i = 0; i < max_len; ++i) {
-		stream->buffer[i] = 0;
+		stream->buffer[i] = silence;
 	}
 }
 
@@ -339,6 +339,8 @@
         silence = device->spec.silence;
         stream_len = device->spec.size;
     }
+	
+	/* Determine if the streamer is necessary here */
 
     /* Loop, filling the audio buffers */
     while (device->enabled) {