Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

dsp: add option to swap left and right channels

Change-Id: Id4b518638436576cfb5e747548f10ece6e58eba0

authored by

Christian Soffke and committed by
Solomon Peachy
cc7418dd 5ac105c8

+44 -3
+14
apps/lang/english.lang
··· 17085 17085 *: "Show in Files" 17086 17086 </voice> 17087 17087 </phrase> 17088 + <phrase> 17089 + id: LANG_CHANNEL_SWAP 17090 + desc: in sound_settings 17091 + user: core 17092 + <source> 17093 + *: "Swap Left & Right" 17094 + </source> 17095 + <dest> 17096 + *: "Swap Left & Right" 17097 + </dest> 17098 + <voice> 17099 + *: "Swap Left & Right" 17100 + </voice> 17101 + </phrase>
+4 -3
apps/settings_list.c
··· 1060 1060 /* 3-d enhancement effect */ 1061 1061 CHOICE_SETTING(0, channel_config, LANG_CHANNEL_CONFIGURATION, 1062 1062 0,"channels", 1063 - "stereo,mono,custom,mono left,mono right,karaoke", 1064 - sound_set_channels, 6, 1063 + "stereo,mono,custom,mono left,mono right,karaoke,swap", 1064 + sound_set_channels, 7, 1065 1065 ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO), 1066 1066 ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT), 1067 - ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)), 1067 + ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE), 1068 + ID2P(LANG_CHANNEL_SWAP)), 1068 1069 SOUND_SETTING(0, stereo_width, LANG_STEREO_WIDTH, 1069 1070 "stereo_width", SOUND_STEREO_WIDTH), 1070 1071 #ifdef AUDIOHW_HAVE_DEPTH_3D
+1
firmware/export/audiohw.h
··· 674 674 SOUND_CHAN_MONO_LEFT, 675 675 SOUND_CHAN_MONO_RIGHT, 676 676 SOUND_CHAN_KARAOKE, 677 + SOUND_CHAN_SWAP, 677 678 SOUND_CHAN_NUM_MODES, 678 679 }; 679 680
+22
lib/rbcodec/dsp/channel_mode.c
··· 43 43 struct dsp_buffer **buf_p); 44 44 void channel_mode_proc_karaoke(struct dsp_proc_entry *this, 45 45 struct dsp_buffer **buf_p); 46 + void channel_mode_proc_swap(struct dsp_proc_entry *this, 47 + struct dsp_buffer **buf_p); 46 48 47 49 static struct channel_mode_data 48 50 { ··· 131 133 } 132 134 #endif /* CPU */ 133 135 136 + void channel_mode_proc_swap(struct dsp_proc_entry *this, 137 + struct dsp_buffer **buf_p) 138 + { 139 + struct dsp_buffer *buf = *buf_p; 140 + int32_t *sl = buf->p32[0]; 141 + int32_t *sr = buf->p32[1]; 142 + int count = buf->remcount; 143 + 144 + do 145 + { 146 + int32_t l = *sl; 147 + *sl++ = *sr; 148 + *sr++ = l; 149 + } 150 + while (--count > 0); 151 + 152 + (void)this; 153 + } 154 + 134 155 void channel_mode_proc_mono_left(struct dsp_proc_entry *this, 135 156 struct dsp_buffer **buf_p) 136 157 { ··· 194 215 [SOUND_CHAN_MONO_LEFT] = channel_mode_proc_mono_left, 195 216 [SOUND_CHAN_MONO_RIGHT] = channel_mode_proc_mono_right, 196 217 [SOUND_CHAN_KARAOKE] = channel_mode_proc_karaoke, 218 + [SOUND_CHAN_SWAP] = channel_mode_proc_swap, 197 219 }; 198 220 199 221 this->process = fns[((struct channel_mode_data *)this->data)->mode];
+3
manual/configure_rockbox/sound_settings.tex
··· 178 178 to make the singer sound centrally placed, this often (but not 179 179 always) has the effect of removing the voice track from a song. This 180 180 setting also very often has other undesirable effects on the sound. 181 + \item[Swap Left \& Right.] 182 + Plays the left channel in the right stereo channel, and the right 183 + channel in the left stereo channel. 181 184 \end{description} 182 185 183 186 \section{Stereo Width}