From: Brad C. <br...@wa...> - 2004-08-07 18:19:09
|
Brad Campbell wrote: > Michael Roitzsch wrote: > >> Hi Brad, >> >> >>> My feeling is this is where my problem lies.. >>> >>> My gap starts about 6000 and then syncs down to about 4000, where it >>> steadily climbs to 5000, then resyncs back to about 3800. The 3800->5000 >>> resync loop then repeats throughout the entire Stream. I don't have any >>> passthrough offset in the config file and I'm wondering if the gap >>> should >>> actually be > 0 ? >> >> >> >> It should be around 0. If it is constantly increasing for you, either >> your soundcard is playing too fast or your system clock is too slow. >> This makes both clocks drift apart. >> >> But 5000 PTS ticks is only 55ms. Can you hear that? > Horrid as it is, this seems to kludge my problem into working. (where this->gap_tolerance == 5000) In addition to this I also need a passthrough_offset of about -3700 but is obviously a quirk of my card or decoder. This kludge completely solves the sync drift problem. As it was, it was starting at about -18000 and rapidly coming down to less than -5000 (Ignore the negative logic there) and then it slowly worked its way from -5000 to 5000 where it warped back to 3750 (-gap/SYNC_GAP_RATE) (-5000/4). /* for small gaps ( tolerance < abs(gap) < AO_MAX_GAP ) * feedback them into metronom's vpts_offset (when using * metronom feedback for A/V sync) */ // } else if ( abs(gap) < AO_MAX_GAP && abs(gap) > this->gap_tolerance && } else if ( abs(gap) < AO_MAX_GAP && abs(gap) > 100 && cur_time > (last_sync_time + SYNC_TIME_INVERVAL) && bufs_since_sync >= SYNC_BUF_INTERVAL && !this->resample_sync_method ) { xine_stream_t *stream; Doing it this way, it gets to -100 *rapidly* then slowly increments to 100, then just bounces from 75 to 100 with no apparent jerkieness. I'll look into metronom.c and see if I can find out why its doing what it's doing but it has to be something to do with the master clock and my soundcard output rate. Is there any way that the master clock is on a PLL and it's frequency can be varied slightly or is it really synced to the RTC ? I appreciate all the help guys. Regards, Brad |