VibeAGC — VibeSDR's own AGC for RTL-SDR. The dongle's built-in AGC is unreliable and known broken on the RTL-SDR Blog v4, so VibeServer never uses it. This is a control loop of our own: it measures how close the signal is to overloading the converter and moves the tuner gain to suit, one step at a time.
Enable it per radio in the setup page (VibeAGC), and Lock VibeAGC on underneath if you would rather listeners could not switch it off — on a shared receiver one listener's gain is everybody's.
The gain slider is now the starting gain and where it returns: with VibeAGC on the loop begins there and is free to move in either direction, and it goes back there when the last listener leaves rather than being switched off.
Changing gain no longer breaks up the audio
Long-standing on RTL-SDR, in any mode, and it was ours:
- The gain write held the lock the DSP thread takes on every buffer, across two USB control transfers — so each change stopped the demodulator, overflowed the IQ queue and punched a hole in the audio.
- One of those transfers re-asserted a tuner mode nothing ever leaves. SDR++ makes one call; so do we now.
- The digital gain compensation was manufacturing the transient it looked like it should smooth: the digital scale moved when the transfer was queued, the RF when the tuner settled. FM never needed it — the discriminator measures an angle.
- The ADC measurement ran on every sample inside the libusb callback, with three horizontal NEON reductions per 16 bytes. It is now lane-wise, one buffer in four, and only runs when VibeAGC is on.
Also
- The AGC is applied at startup and survives the idle park, so a receiver comes up running it rather than waiting for a listener to switch it on.
- Hysteresis: a gain that overloaded is not tried again until the dial moves or conditions are genuinely clean, which stops it hunting between two adjacent steps.
- A few railed samples per second is an impulse, not an overload — treating any rail as clipping meant the loop could never climb.
Requires macOS 14 or later. Notarised by Apple; Linux and Raspberry Pi builds are on the apt repository at 3.3.1.