Well, to make things easy, I have updated the uFmod include by MichaelW (
freebasic forum)‚ to the latest version. (
uFmod 1.18)
The best thing about this one is that it use Bin2Bas to include your music into your executable, Ok I know, it's the Holy Grall for democoders‚

Enjoy!
Test.bas'--------------------------------------------------
' uFmod example for Freebasic
'
' uFmod.bi:
' Version 0.1 by MichaelW
' Version 0.2 by Rbraz - 05 Aug 2006
'
' FreeBasic + Bin2Bas version by Rbraz - 2006
'
'--------------------------------------------------
ChDir ExePath
Option Explicit
'Includes
#include "windows.bi"
#include "ufmod.bi"
'Include our music
#include "Music.bas"
'Variables
Dim hWave As HWAVEOUT
Dim title_ptr as zstring ptr
'Allocate 50 bytes for music title
title_ptr = allocate(50)
'----------------Main
'Play our music (50601 = music length in bytes)
hWave = uFMOD_PlaySong(@Music(0),50601,XM_MEMORY)
'Get music title
title_ptr = uFMOD_GetTitle()
'Set music volume
uFMOD_SetVolume(60)
Cls
print "Playing ... "; *title_ptr
While Inkey$() <> Chr$(27)
Locate 3,1
Print "Time: "; uFMOD_GetTime()/1000
Sleep 100
Wend
uFMOD_StopSong()
'----------------End
uFmod.bi'---------------------------------------------------
' uFmod 1.18 - http://ufmod.sourceforge.net/
'
' uFmod.bi
' Version 0.1 by MichaelW
' Version 0.2 by Rbraz - 05 Aug 2006
'
'----------------------------------------------------
#include "win/mmsystem.bi"
#define XM_RESOURCE 0
#define XM_MEMORYÂ Â 1
#define XM_FILEÂ Â Â 2
' The uFMOD_PlaySong function starts playing an XM song.
'Â Â --------------
'Â Â Parameters:
'Â Â Â lpXM
'Â Â Â Â Specifies the song to play. If this parameter is NULL,
'Â Â Â Â any currently playing song is stopped. In such a case, function
'Â Â Â Â does not return a meaningful value.
'Â Â Â Â fdwSong parameter determines whether this value is interpreted
'Â Â Â Â as a filename, as a resource identifier or a pointer to an image
'Â Â Â Â of the song in memory.
'Â Â Â param
'Â Â Â Â Handle to the executable file that contains the resource to be
'Â Â Â Â loaded or size of the image of the song in memory. This parameter
'Â Â Â Â is ignored unless XM_RESOURCE or XM_MEMORY is specified in fdwSong.
'Â Â Â fdwSong
'Â Â Â Â Flags for playing the song. The following values are defined
'    Value    Meaning
'Â Â Â Â XM_FILEÂ Â Â lpXM points to filename.
'Â Â Â Â Â Â Â Â Â Â Â param is ignored.
'Â Â Â Â XM_MEMORYÂ Â lpXM points to an image of a song in memory.
'Â Â Â Â Â Â Â Â Â Â Â param is the image size. Once, uFMOD_PlaySong
'Â Â Â Â Â Â Â Â Â Â Â returns, it's safe to free/discard the memory buffer.
'Â Â Â Â XM_RESOURCEÂ lpXM Specifies the name of the resource.
'Â Â Â Â Â Â Â Â Â Â Â param identifies the module whose executable file
'Â Â Â Â Â Â Â Â Â Â Â contains the resource.
'Â Â Â Â Â Â Â Â Â Â Â The resource type must be RT_RCDATA.
'Â Return Values:
'Â Â Â Returns a pointer to HWAVEOUT on success or NULL otherwise.
declare function uFMOD_PlaySong stdcall alias "uFMOD_PlaySong" (byval as LPVOID , byval as DWORD, byval as DWORD) as HWAVEOUT
' The uFMOD_StopSong function stops the currently playing song, if any.
#define uFMOD_StopSong() uFMOD_PlaySong(0, 0, 0)
' The uFMOD_Pause function pauses the currently playing song, if any.
declare sub uFMOD_Pause stdcall alias "uFMOD_Pause" ()
' The uFMOD_Resume function resumes the currently paused song, if any.
declare sub uFMOD_Resume stdcall alias "uFMOD_Resume" ()
' The uFMOD_GetStats function returns the current RMS volume coefficients
'Â Â in L and R channels.
'Â Â --------------
'Â Â Return Values:
'Â Â Â low-order word : RMS volume in R channel
'   hi-order word : RMS volume in L channel
'
declare function uFMOD_GetStats stdcall alias "uFMOD_GetStats" () as UINTEGER
' The uFMOD_GetTime function returns the time in milliseconds since the
'Â Â song was started. This is useful for synchronizing purposes.
'Â Â --------------
'Â Â Return Values:
'Â Â Â Returns the time in milliseconds since the song was started.
'
declare function uFMOD_GetTime stdcall alias "uFMOD_GetTime" () as UINTEGER
' The uFMOD_GetTitle function returns the current track's title, if any.
'Â Â --------------
'Â Â Return Values:
'Â Â Â Returns the track's title in ASCIIZ format.
'
declare function uFMOD_GetTitle stdcall alias "uFMOD_GetTitle" () as ZSTRING ptr
' The uFMOD_SetVolume function sets the global volume.
'Â Â --------------
'Â Â 0:Â muting
'Â Â 64: maximum volume
'Â Â NOTE: Any value above 64 maps to maximum volume too.
'Â Â The volume scale is linear. Maximum volume is set by default.
'
declare sub uFMOD_SetVolume stdcall alias "uFMOD_SetVolume" (byval as DWORD)
Compile.bat..\..\fbc -s console ufmod.o Test.bas
Ps: Don't forget to use the correct path for fbc. Eg: C:\FreeBasic\fbc -s console ufmod.o Test.bas
Check out the attach below...
[ Edited: music length

]



