summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libao2/ao_jack.c4
-rw-r--r--libao2/ao_sdl.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/libao2/ao_jack.c b/libao2/ao_jack.c
index 494d44aa19..8ee5550602 100644
--- a/libao2/ao_jack.c
+++ b/libao2/ao_jack.c
@@ -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);
}
/**
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index d5652ccf09..28279abc87 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -67,7 +67,7 @@ static unsigned char volume=SDL_MIX_MAXVOLUME;
#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'