Add alarm sound support

This commit is contained in:
Dejvino 2020-12-14 17:23:50 +01:00
parent 452b84cc4a
commit 9a42b49824
2 changed files with 26 additions and 3 deletions

View File

@ -12,12 +12,22 @@ pa-say "Test of emergency warning system will begin."
sleep 1
emergency-light on
pa-volume-loud
pa-say "This is only a test. In the event of an emergency, this emergency warning light would be used to declare an emergency."
pa-say "This is only a test."
pa-alarm-start
sleep 5
pa-alarm-stop
sleep 1
#pa-volume-loud
pa-say "This is only a test. In the event of an emergency, this emergency warning light along with the sound alarm would be used to declare an emergency."
sleep 1
pa-alarm-start
sleep 4
pa-say "This is only a test."
sleep 4
pa-alarm-stop
emergency-light off
pa-volume-normal

View File

@ -20,14 +20,17 @@ function pa-volume() {
}
function pa-volume-normal() {
info "Volume set to Normal"
pa-volume 15
}
function pa-volume-loud() {
info "Volume set to HIGH!"
pa-volume 25
}
function pa-volume-quiet() {
info "Volume set to low"
pa-volume 8
}
@ -61,6 +64,16 @@ function pa-announcement-quickest() {
play $SOUNDS/announcement_4-tone_up_quickest.ogg
}
function pa-alarm-start() {
info "Alarm started"
play -loop 0 $SOUNDS/alarm_simple.ogg &
}
function pa-alarm-stop() {
info "Alarm stopped"
killall $PLAYER
}
function pa-say() {
info "Say: $@"
$SPEAK "$@"