1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

set the speeds the right way round for recording using the rate feeder

This commit is contained in:
Cameron Grant 2002-01-23 05:35:12 +00:00
parent 1e59d53c22
commit 0dd4f3508e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89688

View File

@ -788,6 +788,7 @@ chn_tryspeed(struct pcm_channel *c, int speed)
struct pcm_feeder *f;
struct snd_dbuf *b = c->bufhard;
struct snd_dbuf *bs = c->bufsoft;
struct snd_dbuf *x;
int r, delta;
CHN_LOCKASSERT(c);
@ -832,13 +833,15 @@ chn_tryspeed(struct pcm_channel *c, int speed)
if (f == NULL)
goto out;
r = FEEDER_SET(f, FEEDRATE_SRC, sndbuf_getspd(bs));
DEB(printf("feeder_set(FEEDRATE_SRC, %d) = %d\n", sndbuf_getspd(bs), r));
x = (c->direction == PCMDIR_REC)? b : bs;
r = FEEDER_SET(f, FEEDRATE_SRC, sndbuf_getspd(x));
DEB(printf("feeder_set(FEEDRATE_SRC, %d) = %d\n", sndbuf_getspd(x), r));
if (r)
goto out;
r = FEEDER_SET(f, FEEDRATE_DST, sndbuf_getspd(b));
DEB(printf("feeder_set(FEEDRATE_DST, %d) = %d\n", sndbuf_getspd(b), r));
x = (c->direction == PCMDIR_REC)? bs : b;
r = FEEDER_SET(f, FEEDRATE_DST, sndbuf_getspd(x));
DEB(printf("feeder_set(FEEDRATE_DST, %d) = %d\n", sndbuf_getspd(x), r));
out:
DEB(printf("setspeed done, r = %d\n", r));
return r;