1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

fix SNDCTL_DSP_GETODELAY

PR:		kern/20340
Submitted by:	Takashi SHIRAI <shirai@nintendo.co.jp>
This commit is contained in:
Cameron Grant 2000-08-19 18:29:46 +00:00
parent 4e77c04865
commit fa06efc7e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64847

View File

@ -587,12 +587,13 @@ dsp_ioctl(snddev_info *d, int chan, u_long cmd, caddr_t arg)
case SNDCTL_DSP_GETODELAY:
if (wrch) {
snd_dbuf *b = &wrch->buffer;
snd_dbuf *bs = &wrch->buffer2nd;
if (b->dl) {
chn_checkunderflow(wrch);
if (!(wrch->flags & CHN_F_MAPPED))
while (chn_wrfeed(wrch) > 0);
}
*arg = b->total;
*arg_i = b->rl + bs->rl;
} else
ret = EINVAL;
break;