Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio Fill silence if the last block of the first tr...



details:   https://anonhg.NetBSD.org/src/rev/711c8dc709e7
branches:  trunk
changeset: 451943:711c8dc709e7
user:      isaki <isaki%NetBSD.org@localhost>
date:      Wed Jun 12 13:53:25 2019 +0000

description:
Fill silence if the last block of the first track is not filled.

diffstat:

 sys/dev/audio/audio.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r b39c05699e05 -r 711c8dc709e7 sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Wed Jun 12 13:53:24 2019 +0000
+++ b/sys/dev/audio/audio.c     Wed Jun 12 13:53:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.16 2019/06/10 13:49:39 isaki Exp $ */
+/*     $NetBSD: audio.c,v 1.17 2019/06/12 13:53:25 isaki Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.16 2019/06/10 13:49:39 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.17 2019/06/12 13:53:25 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -5140,6 +5140,9 @@
                                *d++ = ((aint2_t)*s++);
                        }
                }
+               /* Fill silence if the first track is not filled. */
+               for (; i < mixer->frames_per_block * mixer->mixfmt.channels; i++)
+                       *d++ = 0;
        } else {
                /* If this is the second or later, add it. */
 #if defined(AUDIO_SUPPORT_TRACK_VOLUME)



Home | Main Index | Thread Index | Old Index