summaryrefslogtreecommitdiff
path: root/lib/libsndio
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-08-26 05:33:02 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-08-26 05:33:02 +0000
commitfdfcad50cd46134e6b15b4f18ae4ac7e1975b83e (patch)
treed430b451b5f084d728bdd170e4aa84d3c8019857 /lib/libsndio
parent1993de867b2ee6b311e568e62e56d305ed071b1d (diff)
handle incoming AMSG_SETVOL messages, allows the client to be notified
of volume changes
Diffstat (limited to 'lib/libsndio')
-rw-r--r--lib/libsndio/aucat.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index 4e4d7489ba0..e7be5694107 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.24 2009/07/26 12:38:20 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.25 2009/08/26 05:33:01 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -155,6 +155,12 @@ aucat_runmsg(struct aucat_hdl *hdl)
hdl->rstate = STATE_MSG;
hdl->rtodo = sizeof(struct amsg);
break;
+ case AMSG_SETVOL:
+ hdl->curvol = hdl->reqvol = hdl->rmsg.u.vol.ctl;
+ sio_onvol_cb(&hdl->sio, hdl->curvol);
+ hdl->rstate = STATE_MSG;
+ hdl->rtodo = sizeof(struct amsg);
+ break;
case AMSG_GETPAR:
case AMSG_ACK:
hdl->rstate = STATE_IDLE;