⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rme96xx

📁 linux-2.6.15.6
💻
📖 第 1 页 / 共 2 页
字号:
    global spprof    exec $CTRLPROG pro $spprof}proc setemph {} {    global CTRLPROG    global spemph    exec $CTRLPROG emphasis $spemph}proc setnoaud {} {    global CTRLPROG    global spnoaud    exec $CTRLPROG dolby $spnoaud}proc setoptical {} {    global CTRLPROG    global spoptical    exec $CTRLPROG optout $spoptical}proc setspdifin {} {    global CTRLPROG    global spdifin    exec $CTRLPROG spdifin [expr $spdifin - 1]}proc setsyncsource {} {    global CTRLPROG    global syncsource    exec $CTRLPROG syncref [expr $syncsource -1]}proc setmaster {} {    global CTRLPROG    global master    exec $CTRLPROG master $master}proc setwordclock {} {    global CTRLPROG    global wordclock    exec $CTRLPROG wordclock $wordclock}proc setadat1cd {} {    global CTRLPROG    global adat1cd    exec $CTRLPROG adat1cd $adat1cd}frame .control# SPDIF In & SPDIF Outframe .control.spdifframe .control.spdif.inlabel .control.spdif.in.text -text "SPDIF In" -justify leftradiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font timesradiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font timesradiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font timescheckbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font timespack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cdlabel .control.spdif.spaceframe .control.spdif.outlabel .control.spdif.out.text -text "SPDIF Out" -justify leftcheckbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font timescheckbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font timescheckbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font timescheckbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font timespack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottompack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1# Sync Mode & Sync Sourceframe .control.syncframe .control.sync.modelabel .control.sync.mode.text -text "Sync Mode" -justify leftcheckbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font timescheckbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font timespack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wclabel .control.sync.spaceframe .control.sync.srclabel .control.sync.src.text -text "Sync Source" -justify leftradiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font timesradiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font timesradiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font timesradiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font timespack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottompack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1label .control.space -text "" -width 10# Buffer Sizeframe .control.buflabel .control.buf.text -text "Buffer Size (Latency)" -justify leftradiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font timesradiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font timesradiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font timesradiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font timesradiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font timesradiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font timesradiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font timesradiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font timespack .control.buf.text .control.buf.b1 .control.buf.b2 .control.buf.b3 .control.buf.b4 .control.buf.b5 .control.buf.b6 .control.buf.b7 .control.buf.b8 -side top -padx 3 # Offsetframe .control.offsetframe .control.offset.inlabel .control.offset.in.text -text "Offset In" -justify leftlabel .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font timeslabel .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font timeslabel .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font timeslabel .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font timespack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3label .control.offset.spaceframe .control.offset.outlabel .control.offset.out.text -text "Offset Out" -justify leftlabel .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font timeslabel .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font timeslabel .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font timeslabel .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font timespack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottompack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1label .statustext -text Status -justify center -relief ridgelabel .controltext -text Control -justify center -relief ridgelabel .statusspacelabel .controlspacepack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1proc get_bit {output sstr} {    set idx1 [string last [concat $sstr 1] $output]    set idx1 [expr $idx1 != -1]    return $idx1}proc get_val {output sstr} {    set val [string wordend $output [string last $sstr $output]]     set val [string range $output $val [expr $val+1]]    return $val}proc get_val2 {output sstr} {    set val [string wordend $output [string first $sstr $output]]     set val [string range $output $val [expr $val+2]]    return $val}proc get_control {} {    global spprof    global spemph    global spnoaud    global spoptical    global spdifin    global ssrate    global master    global wordclock    global syncsource    global CTRLPROG    set f [open "| $CTRLPROG control" r+]    set ooo [read $f 1000]    close $f#    puts $ooo    set spprof [ get_bit $ooo "pro"]    set spemph [ get_bit $ooo "emphasis"]    set spnoaud [ get_bit $ooo "dolby"]    set spoptical [ get_bit $ooo "opt_out"]    set spdifin [ expr [ get_val $ooo "spdif_in"] + 1]    set ssrate [ expr [ get_val $ooo "latency"] + 1]    set master [ expr [ get_val $ooo "master"]]    set wordclock [ expr [ get_val $ooo "wordclock"]]    set syncsource [ expr [ get_val $ooo "sync_ref"] + 1]}proc get_status {} {    global srate    global ctrlcom    global adatlock1    global adatlock2    global adatlock3    global adatsync1    global adatsync2    global adatsync3    global tcbusy    global tcout    global tcvalid    global spdiferr    global crystal    global .status.spdif.text    global CTRLPROG    set f [open "| $CTRLPROG status" r+]    set ooo [read $f 1000]    close $f#    puts $ooo# samplerate    set idx1 [string last "sr48 1" $ooo]    set idx2 [string last "doublespeed 1" $ooo]    if {$idx1 >= 0} {	set fact1 48000    } else {	set fact1 44100    }    if {$idx2 >= 0} {	set fact2 2    } else {	set fact2 1    }    set srate [expr $fact1 * $fact2]#   ADAT lock    set val [get_val $ooo lockmask]    set adatlock1 0    set adatlock2 0    set adatlock3 0    if {[expr $val & 1]} {       set adatlock3 1    }    if {[expr $val & 2]} {       set adatlock2 1    }    if {[expr $val & 4]} {       set adatlock1 1    }#  ADAT sync    set val [get_val $ooo syncmask]    set adatsync1 0    set adatsync2 0    set adatsync3 0    if {[expr $val & 1]} {       set adatsync3 1    }    if {[expr $val & 2]} {       set adatsync2 1    }    if {[expr $val & 4]} {       set adatsync1 1    }# TC busy    set tcbusy [get_bit $ooo "busy"]    set tcout [get_bit $ooo "out"]    set tcvalid [get_bit $ooo "valid"]    set spdiferr [expr [get_bit $ooo "spdif_error"] == 0]#  000=64kHz, 100=88.2kHz, 011=96kHz#  111=32kHz, 110=44.1kHz, 101=48kHz    set val [get_val $ooo crystalrate]    set crystal "--.- kHz"    if {$val == 0} {        set crystal "64 kHz"    }    if {$val == 4} {        set crystal "88.2 kHz"    }    if {$val == 3} {        set crystal "96 kHz"    }    if {$val == 7} {        set crystal "32 kHz"    }    if {$val == 6} {        set crystal "44.1 kHz"    }    if {$val == 5} {        set crystal "48 kHz"    }    .status.spdif.sr configure -text $crystal}proc get_offset {} {    global inoffset    global outoffset    global CTRLPROG    set f [open "| $CTRLPROG mix" r+]    set ooo [read $f 1000]    close $f#    puts $ooo    if { [string match "*devnr*" $ooo] } {	set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]	set val [get_val2 $ooo i_offset]	.control.offset.in.off0 configure -text "dev\#0: $val"	set val [get_val2 $ooo o_offset]	.control.offset.out.off0 configure -text "dev\#0: $val"    } else {	.control.offset.in.off0 configure -text "dev\#0: -"	.control.offset.out.off0 configure -text "dev\#0: -"    }    if { [string match "*devnr*" $ooo] } {	set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]	set val [get_val2 $ooo i_offset]	.control.offset.in.off1 configure -text "dev\#1: $val"	set val [get_val2 $ooo o_offset]	.control.offset.out.off1 configure -text "dev\#1: $val"    } else {	.control.offset.in.off1 configure -text "dev\#1: -"	.control.offset.out.off1 configure -text "dev\#1: -"    }    if { [string match "*devnr*" $ooo] } {	set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]	set val [get_val2 $ooo i_offset]	.control.offset.in.off2 configure -text "dev\#2: $val"	set val [get_val2 $ooo o_offset]	.control.offset.out.off2 configure -text "dev\#2: $val"    } else {	.control.offset.in.off2 configure -text "dev\#2: -"	.control.offset.out.off2 configure -text "dev\#2: -"    }    if { [string match "*devnr*" $ooo] } {	set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]	set val [get_val2 $ooo i_offset]	.control.offset.in.off3 configure -text "dev\#3: $val"	set val [get_val2 $ooo o_offset]	.control.offset.out.off3 configure -text "dev\#3: $val"    } else {	.control.offset.in.off3 configure -text "dev\#3: -"	.control.offset.out.off3 configure -text "dev\#3: -"    }}proc get_all {} {get_statusget_controlget_offset}# mainwhile {1} {  after 200  get_all  update}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -