summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/abuf.h
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-08-14 09:44:16 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-08-14 09:44:16 +0000
commit27536fe7c65d536ade43cf34815979484f601562 (patch)
tree2e9e82f09cfa5001ba65a4d738d0bd6c087e3965 /usr.bin/aucat/abuf.h
parent176ae4d737b11d07d5a98e458c06aae69b507792 (diff)
move mix/sub underrun/overrun handling code and data in the
generic abuf structure, so it can reused. Required for an audio server. No behaviour change. ok jakemsr
Diffstat (limited to 'usr.bin/aucat/abuf.h')
-rw-r--r--usr.bin/aucat/abuf.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/aucat/abuf.h b/usr.bin/aucat/abuf.h
index d7345e0dcd5..860a6c5be6b 100644
--- a/usr.bin/aucat/abuf.h
+++ b/usr.bin/aucat/abuf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: abuf.h,v 1.5 2008/08/14 09:39:16 ratchov Exp $ */
+/* $OpenBSD: abuf.h,v 1.6 2008/08/14 09:44:15 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -34,9 +34,7 @@ struct abuf {
int mixvol; /* input gain */
unsigned mixdone; /* input of mixer */
unsigned mixtodo; /* output of mixer */
- unsigned mixdrop; /* frames mix_in() will discard */
unsigned subdone; /* output if sub */
- unsigned subdrop; /* silence frames sub_out() will insert */
#define XRUN_IGNORE 0 /* on xrun silently insert/discard samples */
#define XRUN_SYNC 1 /* catchup to sync to the mix/sub */
#define XRUN_ERROR 2 /* xruns are errors, eof/hup buffer */
@@ -51,9 +49,11 @@ struct abuf {
unsigned start; /* offset where data starts */
unsigned used; /* valid data */
unsigned len; /* size of the ring */
+ unsigned silence; /* silence to insert on next write */
+ unsigned drop; /* frames to drop on next read */
struct aproc *rproc; /* reader */
struct aproc *wproc; /* writer */
- unsigned char *data; /* pointer to actual data (immediately following) */
+ unsigned char *data; /* actual data (immediately following) */
};
/*