From 400a54fad59b0fbecb451ce86fc40655ce84139f Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Fri, 5 Oct 2012 21:18:00 +0200 Subject: add system sounds (first part of GH-13) --- sounds/system/LICENSE | 14 ++++++++++++++ sounds/system/error.ogg | Bin 0 -> 15582 bytes sounds/system/shutdown.ogg | Bin 0 -> 35991 bytes sounds/system/startup.ogg | Bin 0 -> 23405 bytes src/audio.vala | 2 +- src/main.vala | 1 + 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 sounds/system/LICENSE create mode 100644 sounds/system/error.ogg create mode 100644 sounds/system/shutdown.ogg create mode 100644 sounds/system/startup.ogg diff --git a/sounds/system/LICENSE b/sounds/system/LICENSE new file mode 100644 index 0000000..db764a9 --- /dev/null +++ b/sounds/system/LICENSE @@ -0,0 +1,14 @@ +Files: error.ogg +Source: http://www.freesound.org/people/Corsica_S/sounds/56097/ +Copyright: 2008, Corsica_S +License: CC-BY-3.0 + +Files: shutdown.ogg +Source: http://www.freesound.org/people/Corsica_S/sounds/104719/ +Copyright: 2010, Corsica_S +License: CC-BY-3.0 + +Files: startup.ogg +Source: http://www.freesound.org/people/Corsica_S/sounds/83342/ +Copyright: 2010, Corsica_S +License: CC-BY-3.0 diff --git a/sounds/system/error.ogg b/sounds/system/error.ogg new file mode 100644 index 0000000..f34f375 Binary files /dev/null and b/sounds/system/error.ogg differ diff --git a/sounds/system/shutdown.ogg b/sounds/system/shutdown.ogg new file mode 100644 index 0000000..2560efd Binary files /dev/null and b/sounds/system/shutdown.ogg differ diff --git a/sounds/system/startup.ogg b/sounds/system/startup.ogg new file mode 100644 index 0000000..31649ff Binary files /dev/null and b/sounds/system/startup.ogg differ diff --git a/src/audio.vala b/src/audio.vala index c1032c5..8e36c70 100644 --- a/src/audio.vala +++ b/src/audio.vala @@ -21,7 +21,7 @@ public class AudioPlayer { } public void play(string file) { - p.uri = file; + p.uri = "file://"+Environment.get_current_dir()+"/sounds/"+file; p.set_state(Gst.State.PLAYING); } } diff --git a/src/main.vala b/src/main.vala index 86f61dd..eccd171 100644 --- a/src/main.vala +++ b/src/main.vala @@ -36,6 +36,7 @@ public static int main(string[] args) { }); write_to_log("KtT Shop System has been started"); + audio.play("system/startup.ogg"); /* attach webserver to mainloop */ new WebServer(); -- cgit v1.2.3