Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Clean up mix_write().
details: https://anonhg.NetBSD.org/src/rev/1eb9ee0ace87
branches: trunk
changeset: 355795:1eb9ee0ace87
user: isaki <isaki%NetBSD.org@localhost>
date: Tue Aug 15 08:30:21 2017 +0000
description:
Clean up mix_write().
diffstat:
sys/dev/audio.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (51 lines):
diff -r 160a77d5e883 -r 1eb9ee0ace87 sys/dev/audio.c
--- a/sys/dev/audio.c Tue Aug 15 08:28:21 2017 +0000
+++ b/sys/dev/audio.c Tue Aug 15 08:30:21 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.398 2017/08/15 08:28:21 isaki Exp $ */
+/* $NetBSD: audio.c,v 1.399 2017/08/15 08:30:21 isaki Exp $ */
/*-
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.398 2017/08/15 08:28:21 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.399 2017/08/15 08:30:21 isaki Exp $");
#ifdef _KERNEL_OPT
#include "audio.h"
@@ -5436,18 +5436,18 @@
stream_fetcher_t *fetcher;
stream_fetcher_t null_fetcher;
int cc, cc1, cc2, blksize, error, used;
- uint8_t *inp, *orig, *tocopy;
+ const uint8_t *orig;
+ uint8_t *tocopy;
vc = sc->sc_hwvc;
blksize = vc->sc_mpr.blksize;
- cc = blksize;
error = 0;
if (audio_stream_get_used(vc->sc_pustream) > blksize)
goto done;
tocopy = vc->sc_pustream->inp;
- orig = __UNCONST(sc->sc_pr.s.outp);
+ orig = sc->sc_pr.s.outp;
used = blksize;
while (used > 0) {
cc = used;
@@ -5469,9 +5469,8 @@
used -= cc;
}
- inp = vc->sc_pustream->inp;
vc->sc_pustream->inp = audio_stream_add_inp(vc->sc_pustream,
- inp, blksize);
+ vc->sc_pustream->inp, blksize);
sc->sc_pr.s.outp = audio_stream_add_outp(&sc->sc_pr.s,
sc->sc_pr.s.outp, blksize);
Home |
Main Index |
Thread Index |
Old Index