Add sound support to mild.edc (which the black theme uses).

Signed-off-by: Chris Michael <devilhorns@comcast.net>
This commit is contained in:
Chris Michael 2013-06-25 21:18:39 +01:00
parent 79194c8550
commit 3885e288f2
1 changed files with 49 additions and 0 deletions

View File

@ -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";