Author Topic: BASS_StreamGetLength  (Read 3332 times)


  • Guest
« on: 27 Mar '03 - 09:47 »
i tried to get the length of a mp3-file with:

function GetLength(file...) {
 ... = StreamCreatefile(...);
 ... = StreamGetLength(...);
 ... = StreamFree(...);
 return Length:
 }  //Just an example, not correct code!

the loop, maybe for 100 files:

for(i=0; i<100; i++) {
 l = GetLength(file i);

now my problem:

my app needs about 2300 kb in memory. with 1 to 5 files nothing happens, but when i use about 100 files the needed memory rises? up to 70000 kb...

can anybody help me(i use w2k), thanxs

Ian @ un4seen

  • Administrator
  • Posts: 22829
Re: BASS_StreamGetLength
« Reply #1 on: 27 Mar '03 - 15:25 »
Just quickly trying that myself, there was no increase in memory usage on Win98, 2K or XP. Are you allocating any memory in your "GetLength" function, and have you checked your app for memory leaks?

Anyway, as you're not playing the streams, you can use the BASS_STREAM_DECODE flag to reduce the processing and resource allocation required in the creation of the streams. See if that helps.