summaryrefslogtreecommitdiff
path: root/lib/libsndio/mio.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-08-21 16:48:04 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-08-21 16:48:04 +0000
commit73e8ba63c46a04a9b2affdc0a36cc570630deec5 (patch)
treef75825b43f5a93dba1ca426db68ebbe73a75cadd /lib/libsndio/mio.c
parent09413d5babedee41e813f85e2e1e4726712d00ed (diff)
make aucat(1) expose a MIDI device to control server behaviour in
realtime. For now only the playback volume of individual streams can be changed/monitored. To each stream is assigned a MIDI channel; the volume is changed/monitored using the standard controller number 7.
Diffstat (limited to 'lib/libsndio/mio.c')
-rw-r--r--lib/libsndio/mio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libsndio/mio.c b/lib/libsndio/mio.c
index 6bdb0a6ac2e..cbeeb5d6be6 100644
--- a/lib/libsndio/mio.c
+++ b/lib/libsndio/mio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mio.c,v 1.6 2009/07/27 06:30:34 ratchov Exp $ */
+/* $OpenBSD: mio.c,v 1.7 2009/08/21 16:48:03 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -42,6 +42,7 @@ mio_open(const char *str, unsigned mode, int nbio)
{
static char prefix_midithru[] = "midithru";
static char prefix_rmidi[] = "rmidi";
+ static char prefix_aucat[] = "aucat";
struct mio_hdl *hdl;
struct stat sb;
char *sep, buf[4];
@@ -82,6 +83,9 @@ mio_open(const char *str, unsigned mode, int nbio)
if (len == (sizeof(prefix_midithru) - 1) &&
memcmp(str, prefix_midithru, len) == 0)
return mio_open_thru(sep + 1, mode, nbio);
+ if (len == (sizeof(prefix_aucat) - 1) &&
+ memcmp(str, prefix_aucat, len) == 0)
+ return mio_open_aucat(sep + 1, mode, nbio);
if (len == (sizeof(prefix_rmidi) - 1) &&
memcmp(str, prefix_rmidi, len) == 0)
return mio_open_rmidi(sep + 1, mode, nbio);