FreeBSD pcm(4) latency (From write() to audible output)
Peter Wood
peter at alastria.net
Fri Aug 13 08:42:16 PDT 2004
> Freebsd-multimedia would be the right place. I think what you
> want is a smaller block size. The SNDCTL_DSP_SETBLKSIZE should be the
> right IOCTL to use, check out the oss programmers manual, I don't have
> a link right now but google should find it pretty quick.
Just to wrap this up here too:
My problem was primarly due to the fragment sizes of buffers. I don't
know what sizes are set as default but they're to big for my
applications. I've found with the following it killed the delay to next
to nothing (about 5ms by my working out).
val = (2 << 16) | 9;
ioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &val);
Thanks Mathew,
Pete.
--
Peter Wood BSc (Hons) :: <peter at alastria.net> :: Tel +44 7974 799440
More information about the freebsd-chat
mailing list