Created
September 7, 2021 09:37
-
-
Save JGrossholtz/477ad8e93d1d065c453e3dfa77ffd94c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Play an mp3 file at start with the wifiberry-miniamp. | |
# Loads all necessary modules and uses ffplay (ffmpeg) to | |
# play the file. | |
# | |
start() { | |
echo "loading modules" | |
modprobe snd_soc_pcm5102a | |
modprobe snd_soc_bcm2835_i2s | |
modprobe snd_soc_rpi_simple_soundcard | |
ffplay -af 'volume=0.1' -autoexit -nodisp /root/elephant.mp3& | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
*) | |
echo "Usage: $0 {start}" | |
exit 1 | |
esac | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment