Doppler frequency shift formula is: f = f0 * (c + vr) / (c + vs)
, where vs/vr -- speed of sender and receiver, and c is the speed of the sound (300m/s for air), you may use (c+vr)/(c+vs)
as your rate
parameter in play()
.
Here's additional info on Doppler shift, if you need it.