From 3885e288f25c70d65693d2671aa6a0c9f348b3c7 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 25 Jun 2013 21:18:39 +0100 Subject: [PATCH] Add sound support to mild.edc (which the black theme uses). Signed-off-by: Chris Michael --- data/themes/mild.edc | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/data/themes/mild.edc b/data/themes/mild.edc index 63417855..f2a85ccd 100644 --- a/data/themes/mild.edc +++ b/data/themes/mild.edc @@ -26,6 +26,11 @@ collections { image: "pm_overlay.png" COMP; image: "pm_fill.png" COMP; } + sounds { + sample { name: "bell" LOSSY 64; + source: "bell.wav"; + } + } parts { //////////////////////////////////////////////////////////////////// // background handling @@ -190,6 +195,10 @@ collections { visible: 1; } } + program { + signal: "bell"; source: "terminology"; + action: PLAY_SAMPLE "bell" 1.0; + } program { signal: "bell"; source: "terminology"; @@ -1085,6 +1094,23 @@ collections { image: "cr_key.png" COMP; image: "cr_out.png" COMP; } + sounds { + sample { name: "key-tap1" LOSSY 64; + source: "kbd-tap.wav"; + } + sample { name: "key-tap2" LOSSY 64; + source: "kbd-tap2.wav"; + } + sample { name: "key-tap3" LOSSY 64; + source: "kbd-tap3.wav"; + } + sample { name: "key-tap4" LOSSY 64; + source: "kbd-tap4.wav"; + } + sample { name: "key-tap5" LOSSY 64; + source: "kbd-tap5.wav"; + } + } parts { part { name: "pulsclip"; type: RECT; description { state: "default" 0.0; @@ -1181,6 +1207,29 @@ collections { target: "outline"; target: "pulsclip"; } + program { + signal: "key,down"; source: "terminology"; + script { + new buf[32]; + snprintf(buf, 31, "key-down%i", (rand() % 5) + 1); + run_program(get_program_id(buf)); + } + } + program { name: "key-down1"; + action: PLAY_SAMPLE "key-tap1" 1.0; + } + program { name: "key-down2"; + action: PLAY_SAMPLE "key-tap2" 1.0; + } + program { name: "key-down3"; + action: PLAY_SAMPLE "key-tap3" 1.0; + } + program { name: "key-down4"; + action: PLAY_SAMPLE "key-tap4" 1.0; + } + program { name: "key-down5"; + action: PLAY_SAMPLE "key-tap5" 1.0; + } program { name: "key"; signal: "key,down"; source: "terminology";