Page 1 of 1
How to understand drift when synchronizing the audio
Posted: 04 Sep 2013 13:03
by busybeeCS
The function aout_DecSynchronize first calls aout_OutputTimeGet to get the drift time and then does
.
Can anybody explain the meaning of drift to me?
Re: How to understand drift when synchronizing the audio
Posted: 04 Sep 2013 18:11
by Rémi Denis-Courmont
In that context, it's the difference between the intended and the estimated actual audio playback time.
Re: How to understand drift when synchronizing the audio
Posted: 05 Sep 2013 15:51
by busybeeCS
In that context, it's the difference between the intended and the estimated actual audio playback time.
then,what is the estimated actual audio playback time and what the intended one?
is the dec_pts estimated?
how to understand :drift += mdate () - dec_pts;
Re: How to understand drift when synchronizing the audio
Posted: 05 Sep 2013 17:47
by Rémi Denis-Courmont
dec_pts is the intended time and mdate() is the current time.
Re: How to understand drift when synchronizing the audio
Posted: 07 Sep 2013 12:36
by busybeeCS
dec_pts is the intended time and mdate() is the current time.
do u mean mdate() is the estimated playback time?
why is there an accumulation in variable drift?
Re: How to understand drift when synchronizing the audio
Posted: 09 Sep 2013 13:32
by edwardw
dec_pts is the estimated time to play this sample. mdate() is the current time. So mdate() - dec_pts is Δtime, or in other words, drift.
And drift is needed in order to ensure that playback is synchronized. This could have many causes, like different decoder speed, or audio output, etc.