mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-24 06:27:17 +00:00
[client] audio/pw: don't discard playback data
This can cause significant glitching, particularly around the start of playback.
This commit is contained in:
parent
042a7d0925
commit
b9c646074d
1
AUTHORS
1
AUTHORS
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user