playing_20an_20mp3_20file_20_28lbb_29
This is an old revision of the document!
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"
playing_20an_20mp3_20file_20_28lbb_29.1522502373.txt.gz · Last modified: 2024/01/05 00:17 (external edit)