1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Initialize pa_buffer_attr.maxlength to -1

(cherry picked from commit b5622e9f78)
This commit is contained in:
Julian Todd
2025-01-27 01:31:51 +00:00
committed by lawnjelly
parent afc36d9a0e
commit 4cb45c7fce

View File

@@ -708,7 +708,8 @@ Error AudioDriverPulseAudio::capture_init_device() {
int input_buffer_frames = closest_power_of_2(input_latency * mix_rate / 1000);
int input_buffer_size = input_buffer_frames * spec.channels;
pa_buffer_attr attr;
pa_buffer_attr attr = {};
attr.maxlength = (uint32_t)-1;
attr.fragsize = input_buffer_size * sizeof(int16_t);
pa_rec_str = pa_stream_new(pa_ctx, "Record", &spec, &pa_rec_map);