summaryrefslogtreecommitdiff
path: root/apps/dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dsp.c')
-rw-r--r--apps/dsp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index 2113d251a1..4bf1ab92d6 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -1175,6 +1175,18 @@ static void channels_process_sound_chan_karaoke(int count, int32_t *buf[])
1175} 1175}
1176#endif /* DSP_HAVE_ASM_SOUND_CHAN_KARAOKE */ 1176#endif /* DSP_HAVE_ASM_SOUND_CHAN_KARAOKE */
1177 1177
1178static void channels_process_sound_chan_swap(int count, int32_t *buf[])
1179{
1180 int32_t *sl = buf[0], *sr = buf[1];
1181
1182 while (count-- > 0)
1183 {
1184 int32_t ch = *sl;
1185 *sl++ = *sr;
1186 *sr++ = ch;
1187 }
1188}
1189
1178static void dsp_set_channel_config(int value) 1190static void dsp_set_channel_config(int value)
1179{ 1191{
1180 static const channels_process_fn_type channels_process_functions[] = 1192 static const channels_process_fn_type channels_process_functions[] =
@@ -1186,6 +1198,7 @@ static void dsp_set_channel_config(int value)
1186 [SOUND_CHAN_MONO_LEFT] = channels_process_sound_chan_mono_left, 1198 [SOUND_CHAN_MONO_LEFT] = channels_process_sound_chan_mono_left,
1187 [SOUND_CHAN_MONO_RIGHT] = channels_process_sound_chan_mono_right, 1199 [SOUND_CHAN_MONO_RIGHT] = channels_process_sound_chan_mono_right,
1188 [SOUND_CHAN_KARAOKE] = channels_process_sound_chan_karaoke, 1200 [SOUND_CHAN_KARAOKE] = channels_process_sound_chan_karaoke,
1201 [SOUND_CHAN_SWAP] = channels_process_sound_chan_swap,
1189 }; 1202 };
1190 1203
1191 if ((unsigned)value >= ARRAYLEN(channels_process_functions) || 1204 if ((unsigned)value >= ARRAYLEN(channels_process_functions) ||