Help loop fix

Blitz3D Forums/Blitz3D Programming/Help loop fix

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.

Global music

;...................


If music = 0 then

size = FileSize (TrackList$(TrackPos)) 
bank = CreateBank (size)
source = ReadFile (TrackList$(TrackPos))
ReadBytes bank, source, 0, size ;we load the sample in a bank

;And load it from there with _LoadMem
music = BASS_SampleLoadMem(1,bank,0,size,Hex$ (BASS_SAMPLE_OVER_VOL+20),0)
;the same way you can work with streams, music or flac & midi (plugins)
FreeBank bank ;now we can delete the bank

sample = BASS_SampleGetChannel(music,BASS_NULL)

endif


simple, isnt it ;)