[MPlayer-cvslog] r29166 - in trunk/libao2: ao_jack.c ao_sdl.c
reimar
subversion at mplayerhq.hu
Fri Apr 10 16:41:18 CEST 2009
Author: reimar
Date: Fri Apr 10 16:41:18 2009
New Revision: 29166
Log:
Simplify: use av_fifo_space
Modified:
trunk/libao2/ao_jack.c
trunk/libao2/ao_sdl.c
Modified: trunk/libao2/ao_jack.c
==============================================================================
--- trunk/libao2/ao_jack.c Fri Apr 10 15:38:57 2009 (r29165)
+++ trunk/libao2/ao_jack.c Fri Apr 10 16:41:18 2009 (r29166)
@@ -82,7 +82,7 @@ static AVFifoBuffer *buffer;
* If there is not enough room, the buffer is filled up
*/
static int write_buffer(unsigned char* data, int len) {
- int free = BUFFSIZE - av_fifo_size(buffer);
+ int free = av_fifo_space(buffer);
if (len > free) len = free;
return av_fifo_generic_write(buffer, data, len, NULL);
}
@@ -337,7 +337,7 @@ static void audio_resume(void) {
}
static int get_space(void) {
- return BUFFSIZE - av_fifo_size(buffer);
+ return av_fifo_space(buffer);
}
/**
Modified: trunk/libao2/ao_sdl.c
==============================================================================
--- trunk/libao2/ao_sdl.c Fri Apr 10 15:38:57 2009 (r29165)
+++ trunk/libao2/ao_sdl.c Fri Apr 10 16:41:18 2009 (r29166)
@@ -67,7 +67,7 @@ static unsigned char volume=SDL_MIX_MAXV
#endif
static int write_buffer(unsigned char* data,int len){
- int free = BUFFSIZE - av_fifo_size(buffer);
+ int free = av_fifo_space(buffer);
if (len > free) len = free;
return av_fifo_generic_write(buffer, data, len, NULL);
}
@@ -280,7 +280,7 @@ static void audio_resume(void)
// return: how many bytes can be played without blocking
static int get_space(void){
- return BUFFSIZE - av_fifo_size(buffer);
+ return av_fifo_space(buffer);
}
// plays 'len' bytes of 'data'
More information about the MPlayer-cvslog
mailing list