Questionable code in sys/dev/sound/pcm/channel.c
John-Mark Gurney
gurney_j at resnet.uoregon.edu
Mon Jul 26 15:42:22 PDT 2004
Conrad J. Sabatier wrote this message on Mon, Jul 26, 2004 at 16:35 -0500:
> if (timeout < 1)
> timeout = 1;
> timeout = 1;
>
> Why the formulaic calculation of timeout, if it's simply going to be
> unconditionally set to 1 immediately afterwards anyway? What's going on
> here?
Well, if you look at the annotations, that absolute set of timeout was
added in rev 1.65 by cg with the comment:
tweaks to reduce latency/pauses in output
> Also, at the end of the function:
>
> if (count <= 0) {
> c->flags |= CHN_F_DEAD;
> printf("%s: play interrupt timeout, channel dead\n", c->name);
> }
>
> return ret;
> }
that was changed in rev1.52 (by cg also), and previously was just a check
for count == 0..
So, I'd recommend a message off to cg and ask why he made this changes...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-current
mailing list