summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorHolger Cremer <HolgerCremer@gmail.com>2017-04-16 01:34:22 +0200
committerHolger Cremer <HolgerCremer@gmail.com>2017-04-16 01:34:22 +0200
commitf891ecc9fbe159ec8a6cf321c43217d59f8cdf02 (patch)
tree6f88f4ef2a2c59388487bbde25451cf7ee3eb34b /src/audio
parent14a7c9ff8a785608c54cd38f50dc14686907889e (diff)
downloadserial-barcode-scanner-f891ecc9fbe159ec8a6cf321c43217d59f8cdf02.tar.bz2
adds a new feature: a user can select it's sond theme in the web interface. If not selected, a random theme is used.
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/audio-interface.vala1
-rw-r--r--src/audio/audio.vala4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/audio/audio-interface.vala b/src/audio/audio-interface.vala
index 89d4a6f..fe13af5 100644
--- a/src/audio/audio-interface.vala
+++ b/src/audio/audio-interface.vala
@@ -19,5 +19,6 @@ public interface AudioPlayer : Object {
public abstract void play_system(string file) throws IOError;
public abstract string get_random_user_theme() throws IOError;
+ public abstract string[] get_user_themes() throws IOError;
public abstract void play_user(string theme, string type) throws IOError;
}
diff --git a/src/audio/audio.vala b/src/audio/audio.vala
index a6e5007..1404969 100644
--- a/src/audio/audio.vala
+++ b/src/audio/audio.vala
@@ -74,6 +74,10 @@ public class AudioPlayerImplementation {
return get_random_file(path + "user/");
}
+ public string[] get_user_themes() {
+ return get_files(path + "user/");
+ }
+
public void play_user(string theme, string type) {
p.set_state(Gst.State.NULL);
var file = get_random_file(path + "user/" + theme+ "/" + type);