Changing sin frequency smoothly in shader
You could go the calculus way and have an explicit rate of change that is outside your shader

float frequency = getFrequency();
sineTime += frequency * deltaTime;


(sineTime could be a float that is scoped right outside of your render loop, so that it retains its value)

And if you pass sineTime into your shader you can just do

float s = sin(sineTime);