On Sat, Dec 27, 2014 at 07:25:07PM -0600, Rob Landley wrote:
> On 12/27/14 16:20, Isaac Dunham wrote:
> > On Sat, Dec 27, 2014 at 02:56:46PM -0600, Rob Landley wrote:
> >> On 07/29/14 17:15, Bradley Conroy wrote:
> >>> /* mix.c - A very basic mixer.
> >>>  *
> >>>  * Copyright 2014 Brad Conroy, dedicated to the Public Domain.
> >>>  *
> >>
> >> I redid mix.c because it segfaulted when I tried it. It still doesn't 
> >> _work_
> >> for me, but neither does aumix or the xfce volume control knob on this
> >> netbook. (I have to pull up pavucontrol, go to tab #3 "output devices",
> > <snip>
> >> I'm reluctant to promote this without being able to test it, but it's 
> >> making
> >> the syscall (which is returning success for me even though it didn't DO
> >> anything, thank you ubuntu 12.04). If anybody with appropriate hardware
> >> could test this, I'd appreciate it.
> > 
> > I suspect that it's not working for you because of pulseaudio.
> > I don't have the cleaned up version since that hasn't been pushed out yet,
> > but the original one works here (HDA sound, alsa+snd-mixer-oss):
> > 
> > mix -d vol -l 100 -r 100 #maxes
> > mix -d vol -l 0 -r 0     #mutes
> > 
> > Push the changes and I'll test.
> 
> Ah, pushed. Sorry about that.

Would have gotten back sooner if the internet weren't down this weekend.
Semi-works, but has several issues.
help needs to be updated:
usage: mix [-m DEV] [-d CHANNEL] [-l VOL] [-r RIGHT]

List OSS sound channels (module snd-mixer-oss), or set volume(s).

-d DEV          Device node (default /dev/mixer)
-l VOL          Volume level
-c CHANNEL      Set/show volume of CHANNEL (default first channel found)
-r RIGHT        Volume of right stereo channel (with -r, -l sets left volume)

should be something like:
usage:...[-d DEV] [-c CHANNEL]
...
-d DEV
-c CHANNEL  //or fully alphabetical

mix -c CHANNEL is aesthetically broken now; it prints the names of all
channels before it hits the specified one:
$ ./mix -c phout
vol
speaker
pcm2
igain
/dev/mixer:phout = left:100      right:100

Also channel selection is now broken. Whatever channel I specify,
it adjusts the speaker volume (which might be vol or speaker).

I think all the bugs are in the "for(channel = 0...)" loop;
I think I see the problem, but need to test.

In other words: expect a patch soon.

> > /dev/mixer is normal, but if you have 2+ audio cards or OSS4 things 
> > are different (not sure if OSS4 would work with this, though).
> 
> Would the multiple audio cards show up as channels, or as dev nodes? (I
> can't say 'devices' because the OSS terminology and the traditional unix
> terminology _both_ use that. Grrr.)

As /dev/mixer* (or similar).
Apparently the original author was not using correct OSS terminology.


HTH,
Isaac Dunham

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to