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 ;)