Skip to content

Commit 0638fd5

Browse files
committed
pulseaudio: Request more recording data per-fragment.
This seems to help some devices that can't keep up with smaller fragment sizes for whatever reason. Fixes #13110. (cherry picked from commit 14a4ae5)
1 parent cb662b6 commit 0638fd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/audio/pulseaudio/SDL_pulseaudio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ static bool PULSEAUDIO_OpenDevice(SDL_AudioDevice *device)
672672
paspec.rate = device->spec.freq;
673673

674674
// Reduced prebuffering compared to the defaults.
675-
paattr.fragsize = device->buffer_size; // despite the name, this is only used for recording devices, according to PulseAudio docs!
675+
676+
paattr.fragsize = device->buffer_size * 2; // despite the name, this is only used for recording devices, according to PulseAudio docs! (times 2 because we want _more_ than our buffer size sent from the server at a time, which helps some drivers).
676677
paattr.tlength = device->buffer_size;
677678
paattr.prebuf = -1;
678679
paattr.maxlength = -1;

0 commit comments

Comments
 (0)