[client] audio/pw: don't discard playback data
This can cause significant glitching, particularly around the start of playback.
This commit is contained in:
1 parent
042a7d0925
commit
b9c646074d
2 files changed
+1
-11
No files matched your search
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user