Author Topic: BASS_StreamCreateFile and length  (Read 2423 times)

René

  • Guest
BASS_StreamCreateFile and length
« on: 19 Mar '03 - 14:52 »
Hi,
i want trim the silence at the begin and end of a track, but the value for the length of the stream is not used.

BeginTrimValue := 50000;
EndTrimValue := 40000000;

FBassHandle := BASS_StreamCreateFile(FALSE, Filename, BeginTrimValue, EndTrimValue, BASS_SAMPLE_3D);

Is it possible to use the values offset and length?

Thank you,
René

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: BASS_StreamCreateFile and length
« Reply #1 on: 20 Mar '03 - 13:59 »
The "offset" and "length" parameters are file positions, not playback positions.

If you know where the silence is, you can use BASS_ChannelSetPosition before starting playback to skip the silence at the start, and set a sync at the position where the end silence begins (and use BASS_ChannelStop in the callback to stop the stream) to skip the end silence.

If you don't know the position/length of the silence, this thread may help...
http://un4seen.com/YaBB.cgi?board=bass&action=display&num=1030268100