aboutsummaryrefslogtreecommitdiffstats
path: root/bin/4a-play
diff options
context:
space:
mode:
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