User Tools

Site Tools


playing_20an_20mp3_20file_20_28lbb_29

Playing an MP3 file (LBB)

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"
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
playing_20an_20mp3_20file_20_28lbb_29.txt · Last modified: 2018/04/17 18:14 by tbest3112