Module Name: src
Committed By: isaki
Date: Wed Jun 12 13:53:25 UTC 2019
Modified Files:
src/sys/dev/audio: audio.c
Log Message:
Fill silence if the last block of the first track is not filled.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/audio/audio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.16 src/sys/dev/audio/audio.c:1.17
--- src/sys/dev/audio/audio.c:1.16 Mon Jun 10 13:49:39 2019
+++ src/sys/dev/audio/audio.c Wed Jun 12 13:53:25 2019
@@ -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 @@ audio_pmixer_mix_track(audio_trackmixer_
*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)