Fmod incbin mp3

BlitzMax Forums/BlitzMax Beginners Area/Fmod incbin mp3

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.

Hi,

I have started writing my first project with BMAX and have decided to use an mp3 for the audio, taking advantage of the Fmod module.

What I want to do is include the mp3 into the program via the 'Incbin' command, but the problem I am having is that once the file is incbinned, I cannnot play it.

IncBin "mymp3.mp3"

Global Music:Int
FSOUND_Init(22000,256,0)
Music = FSOUND_Sample_Load(1,"incbin::mymp3.mp3",0,0,0)

FSOUND_PlaySound(1,Music)


If I rem the 'Incbin' command and modify the 'FSOUND_Sample_Load' parameters to:
Music = FSOUND_Sample_Load(1,"mymp3.mp3",0,0,0)

.. then everythin plays as expected, but obviously the file in no longer included and is called on execution of the program.

I did modify the code to use 'IncBinPtr' and 'IncBinLen', but to no avail.

If you have any pointers/advice or a solution, it would be very appreciated.

Thanks