comparison libao2/ao_oss.c @ 18842:518282cbf238

Respect AOPLAY_FINAL_CHUNK
author pacman
date Wed, 28 Jun 2006 19:22:27 +0000
parents 6927fabaef92
children 0662e5119de2
comparison
equal deleted inserted replaced
18841:3f59edf39ea2 18842:518282cbf238
493 493
494 // plays 'len' bytes of 'data' 494 // plays 'len' bytes of 'data'
495 // it should round it down to outburst*n 495 // it should round it down to outburst*n
496 // return: number of bytes played 496 // return: number of bytes played
497 static int play(void* data,int len,int flags){ 497 static int play(void* data,int len,int flags){
498 len/=ao_data.outburst; 498 if(len==0)
499 len=write(audio_fd,data,len*ao_data.outburst); 499 return len;
500 if(len>ao_data.outburst || !(flags & AOPLAY_FINAL_CHUNK)) {
501 len/=ao_data.outburst;
502 len*=ao_data.outburst;
503 }
504 len=write(audio_fd,data,len);
500 return len; 505 return len;
501 } 506 }
502 507
503 static int audio_delay_method=2; 508 static int audio_delay_method=2;
504 509