Don't let the device frequency change when PortAudio gets a new context