Remove unnecessary NULL checks in configure_alsa_device

All callers pass non-NULL pointers for actual_rate_out and actual_frame_size_out.
This commit is contained in:
Alex P 2025-11-25 10:34:45 +02:00
parent 4cadf38e5a
commit 82562b77c4
1 changed files with 2 additions and 5 deletions

View File

@ -589,11 +589,8 @@ static int configure_alsa_device(snd_pcm_t *handle, const char *device_name, uin
} }
} }
if (actual_rate_out) *actual_rate_out = negotiated_rate; *actual_rate_out = negotiated_rate;
if (actual_frame_size_out) { *actual_frame_size_out = negotiated_rate / 50; // 20ms frames
// Calculate actual frame size based on negotiated rate (20ms frames)
*actual_frame_size_out = negotiated_rate / 50;
}
return 0; return 0;
} }