On Sat, 2013-03-02 at 08:56 +0600, Dmitri Paduchikh wrote: > David Henningsson wrote: > > > Things remaining are: > > - First, I'm not sure the calculations are entirely correct. I think I shouldn't need > > to add process_usec to the wakeup, but if I don't I wake up a few samples before the > > stream has finished playback. > > Sorry if it is a silly question but couldn't this happen because speed > of time inside sound card is somewhat different from that of system > time? That sounds plausible. Also, the timeout argument for ppoll() indicates the *maximum* sleep time. Interestingly, the timeout argument for poll() indicates the *minimum* sleep time. pa_rtpoll_run() may use either, depending on the system... -- Tanu