[client] audio/pw: don't discard playback data

This can cause significant glitching, particularly around the start of
playback.
This commit is contained in:
Chris Spencer 2022-01-10 19:29:57 +00:00 committed by Geoffrey McRae
parent 042a7d0925
commit b9c646074d
2 changed files with 1 additions and 11 deletions

View File

@ -57,3 +57,4 @@ SytheZN <sythe.zn@gmail.com> (SytheZN)
RTXUX <wyf@rtxux.xyz> (RTXUX)
Vincent LaRocca <vincentmlarocca@gmail.com> (VMFortress)
Johnathon Paul Weaver <weaver123_johnathon@hotmail.com> (8BallBomBom)
Chris Spencer <spencercw@gmail.com> (spencercw)

View File

@ -215,17 +215,6 @@ static void pipewire_playbackPlay(uint8_t * data, size_t size)
if (!pw.playback.stream)
return;
// if the buffer fill is higher then the average skip the update to reduce lag
static unsigned int ttlSize = 0;
static unsigned int count = 0;
ttlSize += size;
if (++count > 100 && ringbuffer_getCount(pw.playback.buffer) > ttlSize / count)
{
count = 0;
ttlSize = 0;
return;
}
ringbuffer_append(pw.playback.buffer, data, size / pw.playback.stride);
if (!pw.playback.active)