Skip to content

Commit a743fb5

Browse files
ChaseKnowldenicculus
authored andcommitted
Use PulseAudio fragsize buffer correctly
Fixes broken microphone input in Sober
1 parent ec0e4e2 commit a743fb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/audio/pulseaudio/SDL_pulseaudio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static bool PULSEAUDIO_OpenDevice(SDL_AudioDevice *device)
732732
if (!actual_bufattr) {
733733
result = SDL_SetError("Could not determine connected PulseAudio stream's buffer attributes");
734734
} else {
735-
device->buffer_size = (int) recording ? actual_bufattr->tlength : actual_bufattr->fragsize;
735+
device->buffer_size = (int) recording ? actual_bufattr->fragsize : actual_bufattr->tlength;
736736
device->sample_frames = device->buffer_size / SDL_AUDIO_FRAMESIZE(device->spec);
737737
}
738738
}

0 commit comments

Comments
 (0)