summaryrefslogtreecommitdiffstats
path: root/libao2/ao_sdl.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-03 21:26:23 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-03 21:26:23 +0000
commitd50dcca06ea856e757cb8143fa447c6b63bba42a (patch)
tree07f30be4970c16f5f0abe7c43db15add52024d26 /libao2/ao_sdl.c
parentfb101ef867f9e486cd84f7cee90897b1a6f00e89 (diff)
downloadmpv-d50dcca06ea856e757cb8143fa447c6b63bba42a.tar.bz2
mpv-d50dcca06ea856e757cb8143fa447c6b63bba42a.tar.xz
-abs support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@975 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_sdl.c')
-rw-r--r--libao2/ao_sdl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index 4dff31dccb..4d1ab9d85a 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -40,8 +40,8 @@ LIBAO_EXTERN(sdl)
// 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 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
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 @@ static int play(void* data,int len,int flags){
// return: how many unplayed bytes are in the buffer
static int get_delay(){
- return buffered_bytes;
+ return buffered_bytes + ao_buffersize;
}