[MPlayer-advusers] [MPlayer-dev-eng] [PATCH] Fix block_align on libao2/ao_pcm.c for wav header
lists at pedro.larroy.com
lists at pedro.larroy.com
Thu Aug 11 00:13:48 CEST 2005
Hi I was having problems with some audiosoftware not loading correctly
some pcm dumps made with mplayer, for example with matlab, fixing this
makes those program who use this field happy, and more compliant with
specs, hope you apply, thanks.
Regards.
http://www.cpp-home.com/tutorial.php?333_1
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/DirectX/htm/writingtoawavfile.asp
--
Pedro Larroy Tovar, pedro at larroy dot com
Make debian mirrors with debian-multimirror: http://pedro.larroy.com/deb_mm/
* Las patentes de programación son nocivas para la innovación *
http://proinnova.hispalinux.es/
-------------- next part --------------
begin-base64 664 wavheader.patch.b64
PyBfX2R1bXBfXy53YXYKPyBjc2NvcGUub3V0Cj8gd2F2aGVhZGVyLnBhdGNo
CkluZGV4OiBsaWJhbzIvYW9fcGNtLmMKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PQpSQ1MgZmlsZTogL2N2c3Jvb3QvbXBsYXllci9tYWluL2xpYmFvMi9hb19w
Y20uYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4yOQpkaWZmIC11IC1yMS4y
OSBhb19wY20uYwotLS0gbGliYW8yL2FvX3BjbS5jCTE5IEphbiAyMDA1IDE3
OjE4OjI1IC0wMDAwCTEuMjkKKysrIGxpYmFvMi9hb19wY20uYwk5IEF1ZyAy
MDA1IDEzOjE0OjMxIC0wMDAwCkBAIC0xMjAsNyArMTIwLDcgQEAKIAl3YXZo
ZHIuc2FtcGxlX3JhdGUgPSBsZTJtZV8zMihhb19kYXRhLnNhbXBsZXJhdGUp
OwogCXdhdmhkci5ieXRlc19wZXJfc2Vjb25kID0gbGUybWVfMzIoYW9fZGF0
YS5icHMpOwogCXdhdmhkci5iaXRzID0gbGUybWVfMTYoYml0cyk7Ci0JCisJ
d2F2aGRyLmJsb2NrX2FsaWduID0gbGUybWVfMTYoYW9fZGF0YS5jaGFubmVs
cyooYml0cy84KSk7CiAJd2F2aGRyLmRhdGFfbGVuZ3RoPWxlMm1lXzMyKDB4
N2ZmZmYwMDApOwogCXdhdmhkci5maWxlX2xlbmd0aCA9IHdhdmhkci5kYXRh
X2xlbmd0aCArIHNpemVvZih3YXZoZHIpIC0gODsKIAo=
====
-------------- next part --------------
? __dump__.wav
? cscope.out
? wavheader.patch
Index: libao2/ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.29
diff -u -r1.29 ao_pcm.c
--- libao2/ao_pcm.c 19 Jan 2005 17:18:25 -0000 1.29
+++ libao2/ao_pcm.c 9 Aug 2005 13:14:31 -0000
@@ -120,7 +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;
More information about the MPlayer-advusers
mailing list