Playing MP3's

BlitzMax Forums/BlitzMax Beginners Area/Playing MP3's

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

this might help get you started,

[EDIT] modified to use an alias name to resolve big path names

' mci based windows media controller
' derived from <a href="http://www.gamedev.net/reference/articles/article2053.asp" target="_blank">http://www.gamedev.net/reference/articles/article2053.asp</a>

Extern "win32"

Function mciSendStringA(cmd$z,resultbuffer:Byte Ptr=Null,buffersize=0,hwndcallback=0)

End Extern

Local file$
Local cmd$
Local result

file="E:\music\Bloc Party\Silent Alarm\01 Like Eating Glass.mp3"

cmd="open ~q"+file+"~q alias mysound"

result=mciSendStringA(cmd)

Print "result="+result

cmd="play mysound from 0"

result=mciSendStringA(cmd)

Print "result="+result

Input "hit enter to end"
End