BASS_ATTRIB_VOLDSP latency

Started by Couin,

Couin

Hi  ;D

I probably missed something but I get a delay with BASS_ATTRIB_VOLDSP (in some condition).

I use BASS_ATTRIB_VOLDSP to not "kill" the reverb (cf. my previous topic) when I want to stop a jingle before its end.

It's OK with the actual sound routing (I use mixers and splitters).

For an user that experiences dropouts with mixers/splitters routing, I implenting an option to revert back to the old sound system (where this user has no dropouts), so without mixers/splitters, just BASS_Init for one output device, no input (because it make crashing the app) for the moment, and BASS_StreamCreateFile + BASS_FX_TempoCreate, and BASS_ATTRIB_VOLDSP is applied with dely of around (estimated) 0.5 second.
It results that if I click on a playing jingle (that has reverb) to stop it, it begins top stop 0.5 sec after clicking on the button.

I also noticed the same delay with "Autoducking" a remote stream (BASS_StreamCreateURL).

How can I ride off this delay?
I tried BASS_CONFIG_BUFFER but it does not resolve the problem (and add playback problem, the sound is choppy).

Thanks :)

Ian @ un4seen

The delay is caused by the stream's playback buffer, which is 0.5s long by default (can be changed via BASS_CONFIG_BUFFER and BASS_ATTRIB_BUFFER), because BASS_ATTRIB_VOLDSP is applied (along with any other DSP/FX) before the data enters the buffer. BASS_ATTRIB_VOL doesn't have the delay because it's applied when the data leaves the buffer. So perhaps you can use BASS_ATTRIB_VOL instead?

Another option is to disable playback buffering by setting BASS_ATTRIB_BUFFER to 0:

BASS_ChannelSetAttribute(stream, BASS_ATTRIB_BUFFER, 0);

If interested, please see the BASS_ATTRIB_BUFFER documentation for details.

Couin

Hi Ian,

Thanks for your help :)

BASS_ATTRIB_BUFFER @0 solved the delay problem.

I use BASS_ATTRIB_VOLDSP instead of BASS_ATTRIB_VOL because BASS_ATTRIB_VOL also cutting the reverb sound.