[MPlayer-dev-eng] [PATCH] Playing final chunk of audio

Marek Dopiera siersciu at gmail.com
Sun Oct 17 17:35:39 CEST 2010


On Sunday 17 October 2010 15:27:26 Reimar Döffinger wrote:
> ignored. Below patch should work:
> Index: libao2/ao_sun.c
> ===================================================================
> --- libao2/ao_sun.c     (revision 32499)
> +++ libao2/ao_sun.c     (working copy)
> @@ -665,9 +665,11 @@
>  // it should round it down to outburst*n
>  // return: number of bytes played
>  static int play(void* data,int len,int flags){
> -    if (len < ao_data.outburst) return 0;
> +    if (!(flags & AOPLAY_FINAL_CHUNK)) {
>      len /= ao_data.outburst;
>      len *= ao_data.outburst;
> +    }
> +    if (len <= 0) return 0;
>
>      len = write(audio_fd, data, len);
>      if(len > 0) {
>

Yes, you're right, I agree its much better that way and it does work indeed. 
I'd be grateful if you committed that.

>
> If that makes a real difference, the get_delay function is broken to the
> point of being useless and should be fixed (unless ao_sun really has a
> absolute minimum latency of 40 ms).

get_delay() is fine, it was an error in the patch I've sent.

Regards

-- 
Marek Dopiera
marek at dopiera.pl


More information about the MPlayer-dev-eng mailing list