changeset 16243:178b8b4a62c6

Set block_align in header, seems MatLab can not handle files without. Patch by Pedro Larroy Tovar (pedro at larroy dot com).
author reimar
date Wed, 17 Aug 2005 11:27:11 +0000
parents 07343c1a5983
children 5b6530dacd90
files libao2/ao_pcm.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_pcm.c	Wed Aug 17 07:39:56 2005 +0000
+++ b/libao2/ao_pcm.c	Wed Aug 17 11:27:11 2005 +0000
@@ -120,6 +120,7 @@
 	wavhdr.sample_rate = le2me_32(ao_data.samplerate);
 	wavhdr.bytes_per_second = le2me_32(ao_data.bps);
 	wavhdr.bits = le2me_16(bits);
+	wavhdr.block_align = le2me_16(ao_data.channels * (bits / 8));
 	
 	wavhdr.data_length=le2me_32(0x7ffff000);
 	wavhdr.file_length = wavhdr.data_length + sizeof(wavhdr) - 8;