Homepage Forums RetroPie Project Everything else related to the RetroPie Project Random mp3 playback during gameplay

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #116002
    labelwhore
    Participant

    This is cool as hell, so I didn’t want it to get buried in some random thread about BBC Micro emulators.

    I’ll make a long story short first; sound isn’t working in beebem, the BBC Micro emulator. I came up with an interesting solution that others may be interested in. While I have beebem running, random .MP3s play from an HDD attached to my pi.

    Here’s how I did it:

    First I installed MPG123 and FAPG and ran it against a folder on the HDD attached to my pi that happens to contain a copy of my mp3 collection to create an m3u playlist containing everything.

    sudo apt-get install mpg123
    sudo apt-get install fapg
    fapg --format=m3u --output=/home/pi/playlist.m3u -r /hdd/Music

    ^^ your path would obviously be different

    Then I edited /opt/retropie/configs/beebem/emulators.cfg to look like the following (I kept the old musicless one in there just because):

    beebem-0.0.13="/home/pi/.beebem/beebem-0.0.13/src/beebem %ROM%"
    default="beebem-0.0.13-music"
    beebem-0.0.13-music="/opt/retropie/configs/beebem/beebmusic.sh %ROM%"

    Next I created a file called beebmusic.sh in /opt/retropie/configs/beebem which contains this script:

    #!/bin/bash  
    ROM=$1
    mpg123 -z -@ /home/pi/playlist.m3u &
    /home/pi/.beebem/beebem-0.0.13/src/beebem $ROM
    sleep 1
    sudo killall mpg123

    Now, mpg123 will play random mp3s out of my collection while I’m playing BBC Micro. The music stops when I stop the emulator.

    :)

Viewing 1 post (of 1 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.