mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
bluez5: media-sink: resync ISO streams on playback start
Resynchronize ISO streams on playback (re)start, so the stream positions are aligned immediately. This is better than relying on rate matching to correct any offsets.
This commit is contained in:
parent
261fb64849
commit
5d1782760c
3 changed files with 49 additions and 33 deletions
|
|
@ -157,9 +157,8 @@ static void group_on_timeout(struct spa_source *source)
|
|||
|
||||
if (!stream->sink)
|
||||
continue;
|
||||
if (stream->idle)
|
||||
continue;
|
||||
if (group->paused) {
|
||||
if (stream->idle || group->paused) {
|
||||
stream->this.resync = true;
|
||||
stream->this.size = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -355,13 +354,10 @@ void spa_bt_iso_io_set_cb(struct spa_bt_iso_io *this, spa_bt_iso_io_pull_t pull,
|
|||
set_timers(stream->group);
|
||||
|
||||
stream->idle = true;
|
||||
stream->this.resync = true;
|
||||
|
||||
if (pull == NULL) {
|
||||
stream->this.size = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Pull data now for the next interval */
|
||||
stream->this.now = stream->group->next;
|
||||
stream->pull(&stream->this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue