INACTIVE PROJECT! Musikbeere (german for "music berry") is a script designed for playing music from a headless raspberry pi that is only controlled by four keys attached to GPIO pins.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
508 B

#!/bin/sh
echo "SimplePlayer started!"
cd /music
while [ 0 ]
do
# for f in *.ogg *.mp3
# do
# echo "Playing $f"
# ogg123 -q "$f"
# done
for f in *.ogg *.mp3
do
echo "Playing $f"
echo "$f" | grep -e ".ogg$" > /dev/null
if [ $? -eq 0 ]
then
#OGG file
ogg123 -q "$f"
else
echo "$f" | grep -e ".mp3$" > /dev/null
if [ $? -eq 0 ]
then
#MP3 file
madplay -q "$f"
fi
fi
done
done
echo "SimplePlayer exited infinite loop!"