Engine.getSampleRate() returns -1 in exported VST - workaround?
-
Hi,
I'm using convolution reverb (IR loader) and I've noticed that the output volume changes significantly depending on the host sample rate. The IR sounds much louder at 192000 compared to 96000 or 48000.
After some research I understand this is a known convolution behavior - when the host sample rate is higher, the convolution engine processes more samples, which affects the overall gain.
To compensate, I'm trying to apply gain correction values to my FX chain based on the current sample rate:
I use Engine.getSampleRate() to capture the host sample rate, then apply the compensation. This works inside HISE but after exporting as VST the auto-detection doesn't seem to work correctly in the DAW.
My questions:
Is there a reliable way to get the host sample rate in an exported VST?Thanks!
-
S Sawatakashi marked this topic as a question
-
@Sawatakashi use a Broadcaster instead, it's far more realiable
-
@tomekslesicki thanks bro, what's it tho?