Commit a0e4b6e2 authored by Max Kellermann's avatar Max Kellermann

output/alsa: fix out_frame_size formula, multiply with channels

The hard-coded "3 bytes" was wrong because it ignored the number of channels.
parent 0de39b64
......@@ -674,7 +674,9 @@ alsa_open(struct audio_output *ao, struct audio_format *audio_format, GError **e
}
ad->in_frame_size = audio_format_frame_size(audio_format);
ad->out_frame_size = ad->export.pack24 ? 3 : ad->in_frame_size;
ad->out_frame_size = ad->export.pack24
? (size_t)(audio_format->channels * 3)
: ad->in_frame_size;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment