On Thu, Apr 08, 2010 at 06:38:04AM -0500, Chris Bennett wrote:
> 
> 
> Jacob Meuser wrote:
> >On Wed, Apr 07, 2010 at 10:23:25PM -0500, Chris Bennett wrote:
> >>Jacob Meuser wrote:
> >>>On Wed, Apr 07, 2010 at 05:02:47PM +0100, Edd Barrett wrote:
> >>>>On Wed, Apr 07, 2010 at 07:33:30AM -0500, Chris Bennett wrote:
> >>>>>I noticed that setting softvol-max in mplayer does not work either
> >>>>>in ~/.mplayer/config or on command line.
> >>>>I noticed this when using smplayer. AFAIK it does not work with sndio. 
> >>>>No-one
> >>>>has yet looked into why. Please go ahead ;)
> >>>what do you guys mean by "does not work"?  you mean that mplayer never
> >>>says the volume is > 100%?  that's how it's supposed to work, and it
> >>>works correctly in my testing.
> >>>
> >>what I mean, (and I found a complicated solution to problem on my
> >>end) is that mplayer ignores current sound level settings and always
> >>plays at volume level 127. That value can easily be readjusted, but
> >>only after mplayer is running. One other program that ignores also
> >>is thunderbird.
> >>So annoying that I disable new mail sound effect.
> >
> >ah.  you are talking about aucat volume, not mplayer's internal
> >volume.  softvol affects mplayer's internal volume.
> >
> >>This behavior is very annoying. Not much more than annoying though.
> >>The only two ways I could get around this was to use two xterms or a
> >>script that forks a volume control change after mplayer starts.
> >>I use aucatvol, by the way. Changing volume within mplayer won't
> >>stay stuck throughout a playlist.
> >
> >well, on my machine, mplayer does get it's last aucat volume back.
> >that is, if I start mplayer then set it's aucat volume to 90, then
> >quit mplayer and start it again later, it's aucat volume is 90.
> >this works through playlists too.  mplayer's internal volume,
> >however, gets reset both when stopping/starting and when changing
> >songs in a playlist.  mplayer's internal volume is what is displayed
> >by mplayer.
> >
> >if you are manipulating aucat volume because you have no hardware
> >controls, you might find the nmixer program from the mp3blaster
> >package useful.
> >
> Just tried nmixer, but it has same problem as aucatvol.
> Only works after starting mplayer.
> So that isn't a better solution in my case, since I have a "clearer"
> set of scripts for aucatvol.
> 
> Worth a try, though

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

-- 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);
        }

Reply via email to