]> git.alsa-project.org Git - alsa-plugins.git/commit
upmix: generalize format, code cleanup
authorBenedek Kupper <benedek.kupper@streamunlimited.com>
Thu, 21 Nov 2019 15:28:51 +0000 (16:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Jan 2020 12:04:36 +0000 (13:04 +0100)
commit2d65f367d004fce1cefc88bb0d57d69d18d69208
tree1502dae5c8b9358430d08deebc65f061de377bbf
parentd0a9f46045783a3c8e3210f5b537276cab630c4e
upmix: generalize format, code cleanup

The main purpose of this change is to be able to change the format to
e.g. S32 instead of S16 by changing only two lines on the top of the source.
So a new symbol UPMIX_PCM_FORMAT is added to hide the actual format,
and a special type upmix_sample_t marks the sample type, instead of
fixed short.

The average_copy function was expecting the nchns parameter to be 2,
this parameter is now a local constant.

The variable i is renamed to channel as it denotes the channel index
in every case.

The behavior of the plugin remains identical.

Signed-off-by: Benedek Kupper <benedek.kupper@streamunlimited.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
mix/pcm_upmix.c