Fix the check where we want to use the end of the supported range if the

value is out of the supported range.

Noticed by:	Ed Schouten <ed@fxq.nl>
Reviewed by:	Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
This commit is contained in:
Alexander Leidinger 2006-09-09 14:43:03 +00:00
parent c19ddeda07
commit f3ed5ebbcf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162180

View File

@ -4114,7 +4114,7 @@ uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int reqdir)
bestspeed = UA_SAMP_LO(asf1d);
hiscore = score;
}
} else if (speed < UA_SAMP_HI(asf1d)) {
} else if (speed > UA_SAMP_HI(asf1d)) {
score = 0xfff * UA_SAMP_HI(asf1d) / speed;
if (score > hiscore) {
bestspeed = UA_SAMP_HI(asf1d);