--- scid/scid 2011-03-14 20:26:28.215753758 +0100
+++ scid.local/scid 2011-03-14 20:27:33.615713461 +0100
@@ -997,6 +997,7 @@
set ::utils::sound::announceNew 0
set ::utils::sound::announceForward 0
set ::utils::sound::announceBack 0
+set ::utils::sound::announceEnd 0
# Spell-checking file: default is "spelling.ssp".
if {$windowsOS} {
@@ -50673,7 +50674,7 @@
set ::utils::sound::soundQueue {}
set ::utils::sound::soundFiles [list \
King Queen Rook Bishop Knight CastleQ CastleK Back Mate Promote Check \
- a b c d e f g h x 1 2 3 4 5 6 7 8 move alert]
+ a b c d e f g h x 1 2 3 4 5 6 7 8 move alert BlackResigns WhiteResigns Draw]
# soundMap
#
@@ -50684,7 +50685,7 @@
array set ::utils::sound::soundMap {
K King Q Queen R Rook B Bishop N Knight k CastleK q CastleQ
x x U Back # Mate = Promote + Check alert alert
- a a b b c c d d e e f f g g h h
+ a a b b c c d d e e f f g g h h y BlackResigns z WhiteResigns = Draw
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
}
@@ -50752,6 +50753,9 @@
if {[string range $move 0 4] == "O-O-O"} { set move q }
if {[string range $move 0 2] == "O-O"} { set move k }
+ if {$move == "1"} { set move y }
+ if {$move == "0"} { set move z }
+
set move [::untrans $move]
set parts [split $move ""]
set soundList {}
@@ -50778,6 +50782,9 @@
if {$::utils::sound::announceForward} { AnnounceMove $move }
}
+proc ::utils::sound::AnnounceEnd {move} {
+ if {$::utils::sound::announceEnd} { AnnounceMove $move }
+}
proc ::utils::sound::AnnounceBack {} {
if {$::utils::sound::announceBack} { AnnounceMove U }
@@ -50823,7 +50829,9 @@
set next [lindex $soundQueue 0]
set soundQueue [lrange $soundQueue 1 end]
set isPlayingSound 1
- catch { $next play -blocking 0 -command ::utils::sound::SoundFinished }
+# disable catch if sound not working
+# $next play -blocking 0 -command ::utils::sound::SoundFinished
+ catch {$next play -blocking 0 -command ::utils::sound::SoundFinished }
after 5000 ::utils::sound::CancelSounds
}
@@ -50837,7 +50845,7 @@
proc ::utils::sound::OptionsDialog {} {
set w .soundOptions
- foreach v {soundFolder announceNew announceForward announceBack} {
+ foreach v {soundFolder announceNew announceForward announceBack announceEnd} {
set ::utils::sound::${v}_temp [set ::utils::sound::$v]
}
@@ -50898,6 +50906,11 @@
grid $f.announceBack -row $r -column 0 -columnspan 2 -sticky w
incr r
+ checkbutton $f.announceEnd -text $::tr(SoundsAnnounceEnd) \
+ -variable ::utils::sound::announceEnd_temp
+ grid $f.announceEnd -row $r -column 0 -columnspan 2 -sticky w
+ incr r
+
dialogbutton $w.b.ok -text OK -command ::utils::sound::OptionsDialogOK
dialogbutton $w.b.cancel -text $::tr(Cancel) -command [list destroy $w]
packbuttons right $w.b.cancel $w.b.ok
@@ -50934,7 +50947,7 @@
}
# Update the user-settable sound variables:
- foreach v {soundFolder announceNew announceForward announceBack} {
+ foreach v {soundFolder announceNew announceForward announceBack announceEnd} {
set ::utils::sound::$v [set ::utils::sound::${v}_temp]
}
@@ -88675,7 +88690,7 @@
gameInfo(showMaterial) gameInfo(showFEN) gameInfo(showTB) \
engineCoach1 engineCoach2 scidBooksDir scidBasesDir ::book::lastBook \
::utils::sound::soundFolder ::utils::sound::announceNew \
- ::utils::sound::announceForward ::utils::sound::announceBack \
+ ::utils::sound::announceForward ::utils::sound::announceBack ::utils::sound::announceEnd \
::tacgame::threshold ::tacgame::blunderwarning ::tacgame::blunderwarningvalue \
::tacgame::levelMin ::tacgame::levelMax ::tacgame::levelFixed ::tacgame::randomLevel \
::tacgame::isLimitedAnalysisTime ::tacgame::showblunder ::tacgame::showblundervalue \
@@ -92240,6 +92255,9 @@
set bArrows [::move::drawVarArrows]
set move [sc_game info next]
+# if snack is busted - i.e. compiled without ALSA we can use the speak script from
+# crafty
+# set speech [exec ./speak $move]
if {$count == 1} {
if {[sc_var count] != 0 && ! $autoplayMode && $::showVarPopup} {
::commenteditor::storeComment
@@ -94013,6 +94031,7 @@
} else {
# Not in a batch, just stop
#
+ ::utils::sound::AnnounceEnd [sc_game tags get Result]
cancelAutoplay
return
}
@@ -99408,6 +99427,7 @@
translate E SoundsAnnounceNew {Announce new moves as they are made}
translate E SoundsAnnounceForward {Announce moves when moving forward one move}
translate E SoundsAnnounceBack {Announce when retracting or moving back one move}
+translate E SoundsAnnounceEnd {Announce game result at the end}
# Upgrading databases:
translate E Upgrading {Upgrading}
@@ -101135,6 +101155,7 @@
translate K SoundsAnnounceNew {Anunciar noves jugades quan estiguin fetes}
translate K SoundsAnnounceForward {Anunciar jugades quan avancem una jugada}
translate K SoundsAnnounceBack {Anunciar jugada quan rectifiquem o retrocedim una jugada}
+translate K SoundsAnnounceEnd {}
# Upgrading databases:
translate K Upgrading {Actualització}
@@ -102859,6 +102880,7 @@
translate C SoundsAnnounceNew {Oznamovat tahy pøi jejich provedení}
translate C SoundsAnnounceForward {Oznamovat tahy pøi posunu o tah vpøed}
translate C SoundsAnnounceBack {Oznamovat pøi vzetí tahu zpìt nebo posunu o tah zpìt}
+translate C SoundsAnnounceEnd {}
# Upgrading databases:
translate C Upgrading {Upgrade}
@@ -108294,6 +108316,7 @@
translate D SoundsAnnounceNew {Kündige neue Züge an, wenn sie ausgeführt werden}
translate D SoundsAnnounceForward {Künde Zug an beim Vorwärtspielen}
translate D SoundsAnnounceBack {Kündige Zug an beim Zurückgehen}
+translate D SoundsAnnounceEnd {}
# Upgrading databases:
translate D Upgrading {Upgrading}
@@ -115604,6 +115627,7 @@
translate F SoundsAnnounceNew {Annoncer les coups joués}
translate F SoundsAnnounceForward {Annoncer les coups quand avance d'un coup}
translate F SoundsAnnounceBack {Annoncer quand retour arrière d'un coup}
+translate F SoundsAnnounceEnd {}
# Upgrading databases:
translate F Upgrading {Mise à jour}
@@ -117579,6 +117603,7 @@
translate G SoundsAnnounceNew {Îναγγελία ÏÏν νÎÏν κινήÏεÏν καθÏÏ ÎµÎºÏελοÏνÏαι}
translate G SoundsAnnounceForward {Îναγγελία ÏÏαν ÏÏÏκειÏαι για μια κίνηÏη ÏÏÎ¿Ï Ïα εμÏÏÏÏ}
translate G SoundsAnnounceBack {Îναγγελία ÏÏαν ÏÏÏκειÏαι για αναδÏομή ή για κίνηÏη ÏÏÎ¿Ï Ïα ÏίÏÏ}
+translate G SoundsAnnounceEnd {}
# Upgrading databases:
translate G Upgrading {ÎνημÎÏÏÏη}
@@ -119284,6 +119309,7 @@
translate H SoundsAnnounceNew {Új lépés bemondása amint megtesszük}
translate H SoundsAnnounceForward {Lépés bemondása amikor egy lépést elõre lépünk}
translate H SoundsAnnounceBack {Lépés bemondása amikor visszaveszünk vagy egy lépést hátra lépünk}
+translate H SoundsAnnounceEnd {}
# Upgrading databases:
translate H Upgrading {Felújítás}
@@ -121363,6 +121389,7 @@
translate I SoundsAnnounceNew {Announce new moves as they are made} ;# ***
translate I SoundsAnnounceForward {Announce moves when moving forward one move} ;# ***
translate I SoundsAnnounceBack {Announce when retracting or moving back one move} ;# ***
+translate I SoundsAnnounceBack {Announce game result at end} ;# ***
# Upgrading databases:
translate I Upgrading {Aggiornamento}
@@ -123482,6 +123509,7 @@
translate N SoundsAnnounceNew {Kondig nieuwe zetten aan als ze gedaan worden} ;
translate N SoundsAnnounceForward {Kondig aan als één zet vooruit gedaan wordt} ;
translate N SoundsAnnounceBack {Kondig aan als één zet terug gedaan of genomen wordt} ;
+translate N SoundsAnnounceEnd {}
# Upgrading databases:
translate N Upgrading {Bijwerken}
@@ -125520,6 +125548,8 @@
translate O SoundsAnnounceNew {Announce new moves as they are made} ;# ***
translate O SoundsAnnounceForward {Announce moves when moving forward one move} ;# ***
translate O SoundsAnnounceBack {Announce when retracting or moving back one move} ;# ***
+translate O SoundsAnnounceEnd {Announce result at end} ;# ***
+
# Upgrading databases:
translate O Upgrading {Oppgraderer}
@@ -127777,6 +127807,7 @@
translate P SoundsAnnounceNew {Announce new moves as they are made} ;# ***
translate P SoundsAnnounceForward {Announce moves when moving forward one move} ;# ***
translate P SoundsAnnounceBack {Announce when retracting or moving back one move} ;# ***
+translate P SoundsAnnounceEnd {Announce game result at end} ;# ***
# Upgrading databases:
translate P Upgrading {Konwersja}
@@ -130056,6 +130087,7 @@
translate B SoundsAnnounceNew {Anuncia novos movimentos quando eles são feitos} ;# ***
translate B SoundsAnnounceForward {Anuncia movimentos quando avançar um movimento} ;# ***
translate B SoundsAnnounceBack {Anuncia movimentos quando retroceder um movimento} ;# ***
+translate B SoundsAnnounceEnd {} ;# ***
# Upgrading databases:
translate B Upgrading {Atualizando}
@@ -131999,6 +132031,8 @@
translate R SoundsAnnounceForward {Announce moves when moving forward one move}
# ====== TODO To be translated ======
translate R SoundsAnnounceBack {Announce when retracting or moving back one move}
+# ====== TODO To be translated ======
+translate R SoundsAnnounceEnd {Announce game result at end} ;# ***
# Upgrading databases:
translate R Upgrading {Îáíîâëåííûé}
@@ -134244,6 +134278,7 @@
translate Y SoundsAnnounceNew {Announce new moves as they are made} ;# ***
translate Y SoundsAnnounceForward {Announce moves when moving forward one move} ;# ***
translate Y SoundsAnnounceBack {Announce when retracting or moving back one move} ;# ***
+translate Y SoundsAnnounceEnd {Announce game result at end} ;# ***
# Upgrading databases:
translate Y Upgrading {Unapreðivanje}