diff options
author | netchild <netchild@FreeBSD.org> | 2005-12-29 18:11:11 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2005-12-29 18:11:11 +0000 |
commit | 7df453b8824ac5fc9d78a53a0228b09f5f93a18d (patch) | |
tree | d2a733f2a06561e9d467f0468ffe6d3bd6da27ac | |
parent | a31913be5e5db4f2b54b5b68667500f27ca25cb4 (diff) | |
download | FreeBSD-src-7df453b8824ac5fc9d78a53a0228b09f5f93a18d.zip FreeBSD-src-7df453b8824ac5fc9d78a53a0228b09f5f93a18d.tar.gz |
Fix some kind of "off by one"-error: the min or max sample rate the
device is able to reproduce should be usable too instead of failing
in such a case.
PR: 89269
Submitted by: Don L. Belcher <don@siad.net>
-rw-r--r-- | sys/dev/sound/usb/uaudio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 17c3b79..812e51c 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -3838,8 +3838,8 @@ uaudio_init_params(struct uaudio_softc *sc, struct chan *ch, int mode) if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) { DPRINTFN(2,("uaudio_set_params: cont %d-%d\n", UA_SAMP_LO(a1d), UA_SAMP_HI(a1d))); - if (UA_SAMP_LO(a1d) < ch->sample_rate && - ch->sample_rate < UA_SAMP_HI(a1d)) { + if (UA_SAMP_LO(a1d) <= ch->sample_rate && + ch->sample_rate <= UA_SAMP_HI(a1d)) { if (mode == AUMODE_PLAY) sc->sc_playchan.altidx = i; else |