Mercurial > mplayer.hg
changeset 18842:518282cbf238
Respect AOPLAY_FINAL_CHUNK
author | pacman |
---|---|
date | Wed, 28 Jun 2006 19:22:27 +0000 |
parents | 3f59edf39ea2 |
children | df3924884fd0 |
files | libao2/ao_oss.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_oss.c Wed Jun 28 17:03:16 2006 +0000 +++ b/libao2/ao_oss.c Wed Jun 28 19:22:27 2006 +0000 @@ -495,8 +495,13 @@ // it should round it down to outburst*n // return: number of bytes played static int play(void* data,int len,int flags){ - len/=ao_data.outburst; - len=write(audio_fd,data,len*ao_data.outburst); + if(len==0) + return len; + if(len>ao_data.outburst || !(flags & AOPLAY_FINAL_CHUNK)) { + len/=ao_data.outburst; + len*=ao_data.outburst; + } + len=write(audio_fd,data,len); return len; }