diff --git a/src/bluealsa-pcm-multi.c b/src/bluealsa-pcm-multi.c index fc95e071d..eb66f260c 100644 --- a/src/bluealsa-pcm-multi.c +++ b/src/bluealsa-pcm-multi.c @@ -96,8 +96,7 @@ bool bluealsa_pcm_multi_enabled(const struct ba_transport *t) { int bluealsa_pcm_multi_delay_get(const struct bluealsa_pcm_multi *multi) { if (!bluealsa_pcm_multi_is_playback(multi)) return 0; - int delay = bluealsa_mix_buffer_delay(&multi->playback_buffer, multi->playback_buffer.end); - delay += BLUEALSA_MULTI_CLIENT_THRESHOLD * 10000 / multi->pcm->rate; + int delay = (bluealsa_mix_buffer_delay(&multi->playback_buffer, multi->playback_buffer.end) + BLUEALSA_MULTI_CLIENT_THRESHOLD) * 100 / multi->pcm->channels / multi->pcm->rate; return delay; }