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. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
playing_20an_20mp3_20file_20_28lbb_29.txt · Last modified: 2024/01/05 00:21 by 127.0.0.1