by Richard Russell, January 2016

This is a very simple, no-frills, way of playing an MP3 file:

    mp3file$ = "C:\users\richard\music\Saint_Saens-Organ.mp3"
    ret$ = space$(128) + chr$(0)
    cmd$ = "open " + chr$(34) + mp3file$ + chr$(34) + " type mpegvideo alias music"
    calldll #winmm, "mciSendStringA", cmd$ as ptr, ret$ as ptr, 128 as long, 0 as long, r as long
    cmd$ = "play music"
    calldll #winmm, "mciSendStringA", cmd$ as ptr, ret$ as ptr, 128 as long, 0 as long, r as long

If you want the MP3 file to be played repeatedly you can change the play command to:

    cmd$ = "play music repeat"