Alternative smoother implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

to get even better latency stability of module-loopback, I am still 
working on an alternative
smoother implementation. I am at the point where I have created a set of 
functions similar
to the original implementation:


/* Create new smoother */
pa_smoother_2* pa_smoother_2_new(pa_usec_t window, size_t frame_size, 
uint32_t rate);
/* Free the smoother */
void pa_smoother_2_free(pa_smoother_2* s);
/* Reset the smoother */
void pa_smoother_2_reset(pa_smoother_2 *s);

/* Add a new data point and re-calculate time conversion factor */
void pa_smoother_2_put(pa_smoother_2 *s, pa_usec_t time_stamp, int64_t 
byte_count);

/* Calculate the current latency. For a source, the sign must be inverted */
int64_t pa_smoother_2_get_delay(pa_smoother_2 *s, pa_usec_t time_stamp, 
size_t byte_count);
/* Convert a time interval from sound card time to system time */
pa_usec_t pa_smoother_2_get(pa_smoother_2 *s, pa_usec_t time_stamp);
/* Convert system time to sound card time */
pa_usec_t pa_smoother_2_translate(pa_smoother_2 *s, pa_usec_t 
time_difference);

/* Enable USB hack */
void pa_smoother_2_usb_hack_enable(pa_smoother_2 *s, bool enable, 
pa_usec_t offset);
/* Set user time offset */
void pa_smoother_2_set_time_offset(pa_smoother_2 *s, pa_usec_t offset);


My question is how I should integrate this with the current code. I see 
two possibilities:
- Replace the old smoother wherever it is used
- Add a parameter to daemon.conf (use-alternative-smoother) so that you 
can choose
   between the two implementations.
Probably the second option is preferable. What do you think? Any better 
idea?

Regards
              Georg



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux