/usr/share/doc/tcl-snack-doc/examples/tcl/mapChan.tcl is in tcl-snack-doc 2.2.10.20090623-dfsg-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #!/bin/sh
# the next line restarts using wish \
exec wish8.3 "$0" "$@"
package require -exact snack 2.2
snack::sound s
set v(0) 1
set v(1) 0
set v(2) 0
set v(3) 1
set f [snack::filter map $v(0) $v(1) $v(2) $v(3)]
pack [label .l -text "In (L,R)"] -anchor e
pack [frame .f]
pack [label .f.l -text Out] -side left
pack [frame .f.f] -side left
pack [frame .f.f.t]
pack [frame .f.f.b]
pack [label .f.f.t.l -text L] -side left
pack [checkbutton .f.f.t.a -var v(0) -command Config] -side left
pack [checkbutton .f.f.t.b -var v(1) -command Config] -side left
pack [label .f.f.b.l -text R] -side left
pack [checkbutton .f.f.b.a -var v(2) -command Config] -side left
pack [checkbutton .f.f.b.b -var v(3) -command Config] -side left
pack [frame .fb]
snack::createIcons
pack [button .fb.a -image snackOpen -command Load] -side left
pack [button .fb.b -bitmap snackPlay -command Play] -side left
pack [button .fb.c -bitmap snackStop -command "s stop"] -side left
proc Config {} {
global f v
$f configure $v(0) $v(1) $v(2) $v(3)
}
proc Play {} {
global f
s stop
s play -devicechannels 2 -filter $f
}
proc Load {} {
set file [snack::getOpenFile -initialdir [file dirname [s cget -file]]]
if {$file == ""} return
s config -file $file
}
|