Adding a Mute function to the SB2 remote is really easy.  The Mute
function already exists in the Slimserver code.  It just needs a
mapping for the remote.

Edit this file:

C:\Program Files\SlimServer\Server\IR\Default.map

(or whereever you loaded slimserver.)  You might want to save a copy of
the original file.  I did not find a way to create a map file of a
different name and have slimserver point to it (instead of
Default.map), but I think that is supposed to be possible.

Decide what button you want to overload the "Mute" function on.  You do
not have to give up the original function of the button.  The Slim
architecture has allowed for both brief button presses and extended
button presses.  Pause is an example of this: press Pause briefly and
the Squeezebox will pause.  Press Pause for a bit longer ("press and
hold") and the "Stop" function is executed.  You'll probably want to
choose a button which does not already have a "hold" feature
implemented (you'll see I did not strictly follow that advice below). 
Currently, the buttons which have "hold" implemented are:

rew, fwd, pause, play and add.  The numbers [0-9] also have "hold"
implemented, but only during text entry, as used in Searching, i.e.
press-and-hold "5" enters "5" instead of the letters "J", "K", or "L".

Anyway, I chose the 0 button as the one to implement the "Mute"
function.  I chose this button because it kind of makes sense:

1) It's close to where SoftSqueeze has its Mute button.

2) "0" is a nice mnemonic to remember "Mute."

3) I wanted to see if overloading the hold function on a number key
would mess up the search function for that key (it doesn't).

So to continue the instructions for editing of the Default.map file,
under the [Common] section header, add this line:

0.hold = muting

Whitespace does not matter; I saw that the Defaults.map file happens to
use tabs--you could follow this practice.

[You could add the above line right under this existing line:

0 = numberScroll_0

so that you'll easily be able to see what pressing 0 briely does, vs.
pressing it a bit longer.]

Restart slimserver.

That's all there is to it.  Press-hand-hold 0 and it goes to Mute. 
Press-and-hold again and volume is restored.  Just like you would
expect.

This is one cool toy.

- Dave


-- 
Dave D
_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to