aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xencode-alsasrc-sox.sh19
-rw-r--r--zmq-simul.mux4
2 files changed, 21 insertions, 2 deletions
diff --git a/encode-alsasrc-sox.sh b/encode-alsasrc-sox.sh
new file mode 100755
index 0000000..5ec8db7
--- /dev/null
+++ b/encode-alsasrc-sox.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Read audio from ALSA input using sox, and encode with fdk-aac-dabplus-zmq
+#
+BITRATE=$1
+DST=$2
+ALSASRC="default"
+
+if [ "$DST" == "" ]
+then
+ echo "Usage:"
+ echo " $0 <bitrate> <zmq destination>"
+ exit 1
+fi
+
+sox -t alsa $ALSASRC -b 16 -t raw - rate 48k channels 2 | \
+ ../fdk-aac-dabplus/aac-enc-dabplus-zmq \
+ -i /dev/stdin -b $BITRATE -f raw -a -o $DST
+
diff --git a/zmq-simul.mux b/zmq-simul.mux
index a08f5c7..1e9fab1 100644
--- a/zmq-simul.mux
+++ b/zmq-simul.mux
@@ -43,7 +43,7 @@ subchannels {
sub_fb {
type dabplus
; use ZeroMQ:
- inputfile "tcp://localhost:2720"
+ inputfile "tcp://*:9000"
nonblock false
bitrate 64
id 24
@@ -80,7 +80,7 @@ components {
; A list of outputs, in the format
; unique_id "uri"
outputs {
- ;foobar "fifo:///dev/stdout?type=raw"
+ foobar "fifo:///dev/stdout?type=raw"
;zmq "zmq+tcp://*:8080"
; This throttles muxing down to nominal rate