sourcestats: add fixed minimum delay

If the minimum delay is known (in a static network configuration), it
can replace the measured minimum from the register. This should improve
the stability of corrections for asymmetric jitter, sample weighting and
maxdelay* tests.
This commit is contained in:
Miroslav Lichvar
2017-08-17 16:44:18 +02:00
parent 3d08815efb
commit d0964ffa83
7 changed files with 26 additions and 10 deletions

View File

@@ -213,7 +213,8 @@ void SRC_Finalise(void)
/* Function to create a new instance. This would be called by one of
the individual source-type instance creation routines. */
SRC_Instance SRC_CreateNewInstance(uint32_t ref_id, SRC_Type type, int sel_options, IPAddr *addr, int min_samples, int max_samples)
SRC_Instance SRC_CreateNewInstance(uint32_t ref_id, SRC_Type type, int sel_options, IPAddr *addr,
int min_samples, int max_samples, double min_delay)
{
SRC_Instance result;
@@ -225,7 +226,7 @@ SRC_Instance SRC_CreateNewInstance(uint32_t ref_id, SRC_Type type, int sel_optio
max_samples = CNF_GetMaxSamples();
result = MallocNew(struct SRC_Instance_Record);
result->stats = SST_CreateInstance(ref_id, addr, min_samples, max_samples);
result->stats = SST_CreateInstance(ref_id, addr, min_samples, max_samples, min_delay);
if (n_sources == max_n_sources) {
/* Reallocate memory */