[patch] alsa plugin should check rate
It is a mandatory to check the actual rate after calling snd_pcm_hw_params_set_rate_near(). Otherwise it may be an arbitrary value. I have the sound card that (or its driver) only supports 48KHz. When libao is trying to set, say, 22050, the rate will still be 48K, so the playback will be of the wrong speed. The attached patch fixes the problem.