summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-10-05 21:18:00 +0200
committerSebastian Reichel <sre@ring0.de>2012-10-05 21:18:00 +0200
commit400a54fad59b0fbecb451ce86fc40655ce84139f (patch)
treee104649f5c96031d0b5bc17926758a405ebcc00f
parent6b69561a171568b36710e0e28aea9f0bd59a295c (diff)
downloadserial-barcode-scanner-400a54fad59b0fbecb451ce86fc40655ce84139f.tar.bz2
add system sounds (first part of GH-13)
-rw-r--r--sounds/system/LICENSE14
-rw-r--r--sounds/system/error.oggbin0 -> 15582 bytes
-rw-r--r--sounds/system/shutdown.oggbin0 -> 35991 bytes
-rw-r--r--sounds/system/startup.oggbin0 -> 23405 bytes
-rw-r--r--src/audio.vala2
-rw-r--r--src/main.vala1
6 files changed, 16 insertions, 1 deletions
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
--- /dev/null
+++ b/sounds/system/error.ogg
Binary files differ
diff --git a/sounds/system/shutdown.ogg b/sounds/system/shutdown.ogg
new file mode 100644
index 0000000..2560efd
--- /dev/null
+++ b/sounds/system/shutdown.ogg
Binary files differ
diff --git a/sounds/system/startup.ogg b/sounds/system/startup.ogg
new file mode 100644
index 0000000..31649ff
--- /dev/null
+++ b/sounds/system/startup.ogg
Binary files 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();