[nas] scripting volume changes, other misc.

Paul Fox pgf at foxharp.boston.ma.us
Wed Jan 24 09:42:23 MST 2001


now that i'm starting to use nas for more than just my home control
menuing system, i'm having to add volume control as one of the user
functions.  (i have IR remotes on my diskless clients that control
a voice-output menuing system that runs on the server.  the voice
comes back to the clients by way of nas.)  i'm starting to use nas 
to export the audio from realaudio and mgp123 from the server as well,
so audio control of various types is becoming more important.

in the past i've just used auctl to set the fixed volume for the system,
and that was that.  now i want to raise and lower the volume in steps,
and i'm surprised that there's no good way of doing that from a script.

so, can anyone recommend a way of raising the volume that involves
less of a sledgehammer than:

	g=$(auctl list device 0 gain | sed 's/^.*= //')
	g=$(( g + 5 ))
	test $g -gt 100 && g=100
	auctl set device 0 gain = $g

(lowering is very similar, but different. :-)

(i was very excited by my discovery of aumix, which allows easy
relative volume adjustments ("aumix-minimal -v+5") and spent a while
debugging it until i finally realized that aumix is _not_ a member of
the NAS tool suite.  doh!  i'd been adjusting the volume on the wrong
machine.  :-)

related to volume, i find that though the above works most of the time,
once in a while the volume gets mysteriously changed back to 50 percent,
and i don't believe it's anything my scripts do explicitly.  has anyone
else seen anything anomolous (sp?) in that area?  i guess i'll instrument
nasd to see if i can figure out what's triggering the change -- is there
debug tracing for that sort of thing already present in the server?

and finally -- when i installed nas 1.4.1, i didn't get man pages.

oh.  never mind.  "make install.man".  rtfm.

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



More information about the Nas mailing list