[vlc-devel] Core audio S/PDIF output with latency calculation

David Fuhrmann david.fuhrmann at gmail.com
Mon Mar 11 19:06:46 CET 2013


Am 11.03.2013 um 18:35 schrieb David Fuhrmann <david.fuhrmann at gmail.com>:

> Hi Remi,
> 
> Am 11.03.2013 um 11:08 schrieb Rémi Denis-Courmont <remi at remlab.net>:
> 
>> On Sun, 10 Mar 2013 18:05:36 +0100, David Fuhrmann
>> <david.fuhrmann at gmail.com> wrote:
>>> With this more generic approach, the result would make sense in any
>> case,
>>> also in the case that the length calculation might be changed elsewhere,
>>> later on.
>>> Opinions about that?
>> 
>> Unfortunately, the length of a packet is not necessarily the sum of the
>> length of the packets that it was synthetized from. Rounding errors occur
>> since 48000 is not a divisor of CLOCK_FREQ.
> 
> Of course they are rounding errors, in several audio_filter modules which recalculate i_length I suppose. And these errors will be more significant if i_length values are summed up. For 3 values, it will not really matter much, IMHO.

OK, I just saw that some audio_filters use date_t. So for summing the i_lengths, date_Increment should be used incrementing i_nb_samples, and i_rate need to be sent as divider?

Then, this date_t would be also the correct way for the auhal plugin to summing the i_length values.





More information about the vlc-devel mailing list