On Thu, Apr 08, 2010 at 02:14:40PM +0200, Alexandre Ratchov wrote:

> It's a aucat "feature" (limitation), trivial to change though.
> Should we allow the volume of not-yet-created streams to be
> changed?
> 
> I see no drawback of doing so

hmm.  maybe I'm misunderstanding something.  the description of
the '-v' option in aucat(1) says "In server mode, clients inherit
this paramter."  so, if I start aucat with 'aucat -l -v 90', then
each client's initial volume will be 90, but it can still be set
to 127, and it would be the same overall volume as if I had started
aucat with 'aucat -l' and then set a client's volume to 127?

in other words, this patch lets you set the initial volume of
each client separately, as opposed to, or actually, in addition
to, setting the initial volume of all clients at server startup,
correct?

I could definitely see uses for this.

> -- Alexandre
> 
> Index: midi.c
> ===================================================================
> RCS file: /home/alex/sndio/cvs/src/usr.bin/aucat/midi.c,v
> retrieving revision 1.31
> diff -u -p -r1.31 midi.c
> --- midi.c    3 Apr 2010 06:44:20 -0000       1.31
> +++ midi.c    8 Apr 2010 12:08:18 -0000
> @@ -997,9 +997,9 @@ ctl_ev(struct aproc *p, struct abuf *ibu
>               if (chan >= CTL_NSLOT)
>                       return;
>               slot = p->u.ctl.slot + chan;
> +             slot->vol = ibuf->r.midi.msg[2];
>               if (slot->ops == NULL)
>                       return;
> -             slot->vol = ibuf->r.midi.msg[2];
>               slot->ops->vol(slot->arg, slot->vol);
>               ctl_sendmsg(p, ibuf, ibuf->r.midi.msg, ibuf->r.midi.len);
>       }

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to