Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.bin/audio/common Pull up revision 1.11 (via patch, ...



details:   https://anonhg.NetBSD.org/src/rev/13855e2c85f8
branches:  netbsd-1-5
changeset: 490832:13855e2c85f8
user:      he <he%NetBSD.org@localhost>
date:      Sun Mar 11 21:29:46 2001 +0000

description:
Pull up revision 1.11 (via patch, requested by hubertf):
  Do not play trailing garbage at the end of RIFF WAVE (.wav) files.
  Fixes PR#12328.

diffstat:

 usr.bin/audio/common/audio.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r becd49b62518 -r 13855e2c85f8 usr.bin/audio/common/audio.c
--- a/usr.bin/audio/common/audio.c      Sun Mar 11 21:24:15 2001 +0000
+++ b/usr.bin/audio/common/audio.c      Sun Mar 11 21:29:46 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.9 1999/09/27 05:06:10 mrg Exp $    */
+/*     $NetBSD: audio.c,v 1.9.6.1 2001/03/11 21:29:46 he Exp $ */
 
 /*
  * Copyright (c) 1999 Matthew R. Green
@@ -161,13 +161,14 @@
  * find a .wav header, etc. returns header length on success
  */
 size_t
-audio_parse_wav_hdr(hdr, sz, enc, prec, sample, channels)
+audio_parse_wav_hdr(hdr, sz, enc, prec, sample, channels, datasize)
        void    *hdr;
        size_t  sz;
        int     *enc;
        int     *prec;
        int     *sample;
        int     *channels;
+       size_t *datasize;
 {
        char    *where = hdr;
        wav_audioheaderpart *part;
@@ -257,6 +258,8 @@
                *sample = getle32(fmt->sample_rate);
                *enc = newenc;
                *prec = newprec;
+               if (datasize)
+                       *datasize = (size_t)getle32(part->len);
                part++;
                return ((char *)part - (char *)hdr);
        }



Home | Main Index | Thread Index | Old Index