Dark Bit Factory & Gravity
PROGRAMMING => Freebasic => Topic started by: Clyde on October 13, 2007
-
Hiya Demo Fans,
I wonder if you could point me in the right direction with a little problem I'm facing with Bass,
Im trying to get a song thats loaded into memory via Bin2Bas, to LOOP around once it's finished, but it doesn't. Am I missing something blatantly obvious. As the song plays once only.
'Load module from memory
module = BASS_MusicLoad( TRUE, _ ' BOOL mem,
@music(0) , _ ' void *file,
0, _ ' DWORD offset,
50601, _ ' DWORD length, is this the culprit?
BASS_MUSIC_AUTOFREE or _ ' DWORD flags,
BASS_MUSIC_RAMPS or _ '
BASS_MUSIC_PRESCAN or _ '
BASS_MUSIC_SURROUND, _ '
BASS_MUSIC_LOOP,_ '
0 ) ' DWORD freq
Cheers very much,
Clyde.
-
Looking at bass documentation "BASS_MusicLoad" command takes only 6 arguments:
HMUSIC BASS_MusicLoad(
BOOL mem,
void *file,
DWORD offset,
DWORD length,
DWORD flags,
DWORD freq
);
Try to change it to:
'Load module from memory
module = BASS_MusicLoad( TRUE, _ ' BOOL mem,
@music(0) , _ ' void *file,
0, _ ' DWORD offset,
50601, _ ' DWORD length, is this the culprit?
BASS_MUSIC_AUTOFREE or _ ' DWORD flags,
BASS_MUSIC_RAMPS or _ '
BASS_MUSIC_PRESCAN or _ '
BASS_MUSIC_SURROUND or _ '
BASS_MUSIC_LOOP, _ '
0 ) ' DWORD freq
-
Thanks Rbraz, just added that and for some reason the tune wont replay.