aboutsummaryrefslogtreecommitdiffstats
path: root/bin/4a-play
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2018-07-21 16:17:44 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2019-04-24 14:18:11 +0200
commite8b23b37394800332baf1ffc9b9777c67dc664cd (patch)
treec044db0ab9d1164c9f6c1ca4b2e3e28beeca3ca4 /bin/4a-play
parent28e86894895d16d1a707fd218990a0a58403bee8 (diff)
change media paths
Change-Id: I0d4783d37da25a315073eb847c7f525ed1b51d5c Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'bin/4a-play')
-rwxr-xr-xbin/4a-play18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/4a-play b/bin/4a-play
index 894ab7f..483b892 100755
--- a/bin/4a-play
+++ b/bin/4a-play
@@ -1 +1,17 @@
-# TODO: play using aplay
+#!/bin/bash
+
+# load shell lib
+. $(dirname $BASH_SOURCE)/lib4a-tools.sh
+
+function usage() {
+ log "Usage: $0 <role:file1> [role:file2 ...]"
+ log "Available roles:"
+ exit 1
+}
+
+[[ $# == 0 ]] && usage
+
+for x in "$@"; do
+ log "Playing $x ..."
+ aplay -D Loopback,0,2 $x
+done