Commit d2fd4527 authored by Simon Morlat's avatar Simon Morlat
Browse files

reset MSTickerSynchronizer each time it is associated with a MSTicker.

parent 8f050d37
......@@ -550,8 +550,13 @@ void ms_ticker_get_last_late_tick(MSTicker *ticker, MSTickerLateEvent *ev){
if (need_lock) ms_mutex_unlock(&ticker->lock);
static void ms_ticker_synchronizer_reset(MSTickerSynchronizer* ts){
memset(&ts, 0, sizeof(ts));
void ms_ticker_set_synchronizer(MSTicker *ticker, MSTickerSynchronizer *ts) {
if (ts) {
ms_ticker_set_time_func(ticker, (MSTickerTimeFunc)ms_ticker_synchronizer_get_corrected_time, ts);
} else {
ms_ticker_set_time_func(ticker, NULL, NULL);
......@@ -577,6 +582,8 @@ MSTickerSynchronizer* ms_ticker_synchronizer_new(void) {
return obj;
double ms_ticker_synchronizer_set_external_time(MSTickerSynchronizer* ts, const MSTimeSpec *time) {
int64_t sound_time;
int64_t diff;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment