mirror of https://bitbucket.org/ausocean/av.git
Merged in local-looper (pull request #500)
local-looper Approved-by: Saxon Milton Approved-by: Trek Hopton
This commit is contained in:
commit
e078d9f2bc
|
@ -0,0 +1,14 @@
|
|||
# DESCRIPTION
|
||||
local looper is a process which will continually loop a pcm audio file
|
||||
(like looper: "av/cmd/looper/"). The intended hardware for this system is a raspberry pi
|
||||
zero W, with a USB sound card (AUDIODEV=hw:(1,0)).
|
||||
|
||||
# AUTHORS
|
||||
David Sutton <davidsutton@ausocean.org>
|
||||
|
||||
# SETUP
|
||||
1) move looper.sh to home/pi and run "chmod u+x looper.sh.
|
||||
2) move looper.service to /etc/systemd/system.
|
||||
3) run systemctl enable looper.service.
|
||||
4) run sudo systemctl start looper.service.
|
||||
5) restart the device, and wait for boot and audio should play.
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Loop PCM audio file on boot
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=pi
|
||||
WorkingDirectory=/home/pi/
|
||||
ExecStart=/bin/bash /home/pi/looper.sh
|
||||
|
||||
Type=notify
|
||||
WatchdogSec=70s
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
systemd-notify --ready
|
||||
|
||||
export AUDIODEV=hw:1,0
|
||||
while true; do
|
||||
play -q -V0 -t raw -r 44.1k -e signed -b 16 -c 1 /home/pi/shrimp.pcm
|
||||
systemd-notify --status="service is running" WATCHDOG=1
|
||||
done
|
Loading…
Reference in New Issue