mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
a2dp: improve LDAC
When we update the quality, get the new num_blocks. Set the channel positions correctly.
This commit is contained in:
parent
34a9b1dc1a
commit
e1b8f24d17
2 changed files with 33 additions and 17 deletions
|
|
@ -515,6 +515,7 @@ again:
|
|||
spa_log_trace(this->log, NAME" %p: delay flush", this);
|
||||
if (now_time - this->last_error > SPA_NSEC_PER_SEC / 2) {
|
||||
this->codec->reduce_bitpool(this->codec_data);
|
||||
this->num_blocks = this->codec->get_num_blocks(this->codec_data);
|
||||
this->last_error = now_time;
|
||||
}
|
||||
enable_flush(this, true);
|
||||
|
|
@ -527,6 +528,7 @@ again:
|
|||
else if (written > 0) {
|
||||
if (now_time - this->last_error > SPA_NSEC_PER_SEC) {
|
||||
this->codec->increase_bitpool(this->codec_data);
|
||||
this->num_blocks = this->codec->get_num_blocks(this->codec_data);
|
||||
this->last_error = now_time;
|
||||
}
|
||||
if (!spa_list_is_empty(&port->ready))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue