Resample with unknown rate change
I have done this before and it works as long as you tune your parameters correctly. There should be a gain factor on the integrator which is &lt; 1.0.

If your application is audio, one thing to watch for is audible pitch changes during periods when the ratio is changing. You can add a proportional term to your loop filter to tune the transient response if this is an issue.