Set sounds module's samplerate by a function instead of modifying the globals directly.