changeset 974:0d4e4da7c126

-abs support
author arpi_esp
date Sun, 03 Jun 2001 21:26:23 +0000
parents c08282a937d3
children 65353ed24ac5
files libao2/ao_sdl.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_sdl.c	Sun Jun 03 21:02:46 2001 +0000
+++ b/libao2/ao_sdl.c	Sun Jun 03 21:26:23 2001 +0000
@@ -40,8 +40,8 @@
 
 // General purpose Ring-buffering routines
 
-#define BUFFSIZE 1024
-#define NUM_BUFS 64
+#define BUFFSIZE 4096
+#define NUM_BUFS 16
 
 static unsigned char *buffer[NUM_BUFS];
 
@@ -156,6 +156,9 @@
         	return(0);
 	} 
 	
+	printf("SDL buf size = %d\n",aspec.size);
+	if(ao_buffersize==-1) ao_buffersize=16*aspec.size;
+	
 	/* unsilence audio, if callback is ready */
 	SDL_PauseAudio(0);
 
@@ -209,7 +212,7 @@
 
 // return: how many unplayed bytes are in the buffer
 static int get_delay(){
-    return buffered_bytes;
+    return buffered_bytes + ao_buffersize;
 }