changeset 20250:7cfd3a04d537

Implement AOPLAY_FINAL_CHUNK support for dshow and win32 out.
author reimar
date Sun, 15 Oct 2006 20:48:26 +0000
parents 70b334325fa0
children 2971196cd8c6
files libao2/ao_dsound.c libao2/ao_win32.c
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_dsound.c	Sun Oct 15 18:55:57 2006 +0000
+++ b/libao2/ao_dsound.c	Sun Oct 15 20:48:26 2006 +0000
@@ -605,6 +605,7 @@
 	if(space > buffer_size)space -= buffer_size; // write_offset < play_offset
 	if(space < len) len = space;
 
+	if (!(flags & AOPLAY_FINAL_CHUNK))
 	len = (len / ao_data.outburst) * ao_data.outburst;
 	return write_buffer(data, len);
 }
--- a/libao2/ao_win32.c	Sun Oct 15 18:55:57 2006 +0000
+++ b/libao2/ao_win32.c	Sun Oct 15 20:48:26 2006 +0000
@@ -322,6 +322,7 @@
 // return: number of bytes played
 static int play(void* data,int len,int flags)
 {
+	if (!(flags & AOPLAY_FINAL_CHUNK))
 	len = (len/ao_data.outburst)*ao_data.outburst;
 	return write_waveOutBuffer(data,len);
 }