mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
set the speeds the right way round for recording using the rate feeder
This commit is contained in:
parent
1e59d53c22
commit
0dd4f3508e
1 changed files with 7 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue