Skip to content

Commit

Permalink
variable delay reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
borine committed Jan 5, 2025
1 parent 575a24e commit 4c0ad9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bluealsa-pcm-multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4c0ad9d

Please sign in to comment.