Christopher Monty Montgomery wrote: > On 10/10/06, Clemens Ladisch <[EMAIL PROTECTED]> wrote: > > You could read the delay just after the write and check that it is at > > least as big as the data you've written, but this can, of course, race > > in the other way. (Well, you could think of that as a safety margin ...) > > The race is more acceptable in the other direction, but as you say it > is still a race. > The second problem with that approach, though, is that the > false-positives will 'pile up'. > > If I underrun and the delay goes negative, then write another 1024 > samples, the depth will go to some number that is positive but less > than 1024 as you said. But, in fact, I have 1024 samples in the > queue. The depth will go negative again before they're done playing!
Yes. The underrun means that this write was too late, so the time between this write and the next write must be shorter to catch up. If you don't want to 'throw away' the samples that should have been played during the underrun but instead want to play them (and all following samples) later, call snd_pcm_forward() to skip over some part of the buffer. Regards, Clemens ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel