[nas] [PATCH] changed method of setting the input gain

Paul Fox pgf at foxharp.boston.ma.us
Mon Jul 24 12:59:06 MDT 2006


i wrote:
 > erik wrote:
 >  > On Sun, Jul 23, 2006 at 10:29:07PM -0600, Jon Trulson wrote:
 >  > >         Hmm... It should setup default gains and recsrc if mixerinit
 >  > >         is true.
 >  > 
 >  > That's my opinion as well.
 >  > 
 >  > >         It should probaby setup these defaults every time it
 >  > >         opens the device, shouldn't it?
 >  > 
 >  > I don't think so. The defaults should be applied the first time the
 >  > device is opened. After that the last set values should be activated
 >  > (what is done now to keep the changes made while the device was
 >  > released).
 > 
 > but isn't the point of releasing the device that you want to play
 > well with other users of the device?  in that case, shouldn't you
 > touch nothing at all on a re-acquire of the device?  seems to me
 > the server should query the device for current settings when it
 > re-opens, and start from there.

looking at the code (for other reasons) i see that this is
complicated by the fact that auvoxware.c goes out of its way to
never ever read the current mixer settings.  it only writes to
them.  seems to me that if the device is being shared with other
applications, that nas should be sharing the levels as well.

i'm putting together a patch to implement a "gainscale"
configuration item, which will be a percentage by which all
output gain requests will be reduced.  (this is to keep nas from
causing my sound devices to go into their distortion zone.)

i can also do a patch to eliminate the use of (the recently
renamed :-) "lastPhysicalOutput" variable, in favor of actually
reading the device.

does this make sense?

paul
=---------------------
 paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 77.0 degrees)



More information about the Nas mailing list