Author Topic: BASS_FX_DX8_ECHO effect stops as long as the file ends  (Read 389 times)


  • Posts: 39
In this code:

Code: [Select]
myStream = BASS_StreamCreateFile(pathToFile,0,0,0);

int streamDelay = BASS_ChannelSetFX(myStream, BASS.BASS_FX_DX8_ECHO, DELAY_PRIORITY);
BASS_FXGetParameters(streamDelay, a);
a.fLeftDelay=delay ;
a.fRightDelay=delay ;
boolean b= BASS_FXSetParameters(streamDelay, a);

BASS_ChannelPlay(myStream, false);

For short duration files, the echo stops as soon as the sound ends, which is understood to be because the stream stops at that moment. A solution could be put myStream inside a BASS_Mixer_StreamCreate and apply the effect to this last to obtain the desired result, but is there a direct way to keep the channel active even if the stream ends (BASS_STREAM_AUTOFREE flag is not active in the example)?

Thanks in advance

Ian @ un4seen

  • Administrator
  • Posts: 25866
You can extend the length of a stream via the BASS_ATTRIB_TAIL setting. For example:

Code: [Select]
BASS_ChannelSetAttribute(myStream, BASS_ATTRIB_TAIL, 0.5); // extend by 0.5s

Please see the BASS_ATTRIB_TAIL documentation for details.