The linear volume array needs enough padding when preparing the volumes for
mixing.
static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
unsigned k, channel;
- float linear[PA_CHANNELS_MAX];
+ float linear[PA_CHANNELS_MAX + VOLUME_PADDING];
pa_assert(streams);
pa_assert(spec);
static void calc_linear_float_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
unsigned k, channel;
- float linear[PA_CHANNELS_MAX];
+ float linear[PA_CHANNELS_MAX + VOLUME_PADDING];
pa_assert(streams);
pa_assert(spec);