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

Jon Trulson jon at radscan.com
Mon Jul 24 19:16:18 MDT 2006


On Tue, 25 Jul 2006, Erik Auerswald wrote:

> Hi,
>
> On Mon, Jul 24, 2006 at 02:59:06PM -0400, Paul Fox wrote:
>> i wrote:
>> > erik wrote:
>> > > On Sun, Jul 23, 2006 at 10:29:07PM -0600, Jon Trulson wrote:
[...]
>> > >>         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
>
> IMHO the NAS server should keep it's settings even if after releasing
> the sound device. I'd want to allow other programs to use (and change
> the settings of) the sound device when NAS is not using it, but I would
> not want this to screw up the settings of the NAS server.
>

         I agree here.

> If you want to be very polite you could save the current settings and
> restore them just before releasing the device again.

   Looks like a new option: MixerRestore :)

>
>> > the server should query the device for current settings when it
>> > re-opens, and start from there.
>
> The "mixerinit" option will keep the current mixer settings when first
> opening the device. The "nomixer" option will always keep the mixer
> settings and never change them.
>

         So NAS clients would not be able to alter their gains for
         instance?

> My "consistent gain setting" patches had the reason that I wanted to be
> able to control the NAS settings even if the device is currently
> released. This is very useful if the last NAS user left the gain at 100
> from watching a DVD and my music should be played with gain 30. If the
> NAS server did not change the settings of a reopened device I would have
> to endure some much too loud music for the time I need to react to the
> starting playback.


   You mean non-nas application setting the gain at 100, right?

   From what the code does (and what I see), if a nas app sets output
   gain to 100, then that is what will be used for the next nas app as
   well.

   If I use a NAS app (xmms with NAS pluggin) to set the gain to 100
   then the next nas app, gets the too high gain.  This is why I'd
   prefer option 2.  It's annoying when festival screams at me from
   across the living room, after I've used NAS xmms at too loud a
   volume :)

>> 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.
>
> Well, it actually reads the levels in initMixer(), but never uses them.
> This is to be changed by the reworked "mixerinit" option.
>

         I like the idea of saving/restoring settings.

[...]
>> i can also do a patch to eliminate the use of (the recently
>> renamed :-) "lastPhysicalOutput" variable, in favor of actually
>> reading the device.
>
> As stated above I would not like this.

   Yeah, lets discuss the mixer init stuff and find something we can
   all be happy with :)

-- 
Jon Trulson
mailto:jon at radscan.com http://radscan.com/~jon
#include <std/disclaimer.h>
"No Kill I" -Horta




More information about the Nas mailing list