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.

Don't use function in a function

It is not supported by clang

+28 -28
+28 -28
lib/rbcodec/codecs/mp3_enc.c
··· 2082 2082 return true; 2083 2083 } 2084 2084 2085 + static inline void to_mono(uint16_t **samp) 2086 + { 2087 + int16_t l = **samp; 2088 + int16_t r = *(*samp+1); 2089 + int32_t m; 2090 + 2091 + switch(cfg.rec_mono_mode) 2092 + { 2093 + case 1: 2094 + /* mono = L */ 2095 + m = l; 2096 + break; 2097 + case 2: 2098 + /* mono = R */ 2099 + m = r; 2100 + break; 2101 + case 0: 2102 + default: 2103 + /* mono = (L+R)/2 */ 2104 + m = l + r + err; 2105 + err = m & 1; 2106 + m >>= 1; 2107 + break; 2108 + } 2109 + *(*samp)++ = (uint16_t)m; 2110 + *(*samp)++ = (uint16_t)m; 2111 + } /* to_mono */ 2112 + 2085 2113 STATICIRAM void to_mono_mm(void) ICODE_ATTR; 2086 2114 STATICIRAM void to_mono_mm(void) 2087 2115 { ··· 2090 2118 */ 2091 2119 uint16_t *samp = &mfbuf[2*512]; 2092 2120 uint16_t *samp_end = samp + 2*samp_per_frame; 2093 - 2094 - inline void to_mono(uint16_t **samp) 2095 - { 2096 - int16_t l = **samp; 2097 - int16_t r = *(*samp+1); 2098 - int32_t m; 2099 - 2100 - switch(cfg.rec_mono_mode) 2101 - { 2102 - case 1: 2103 - /* mono = L */ 2104 - m = l; 2105 - break; 2106 - case 2: 2107 - /* mono = R */ 2108 - m = r; 2109 - break; 2110 - case 0: 2111 - default: 2112 - /* mono = (L+R)/2 */ 2113 - m = l + r + err; 2114 - err = m & 1; 2115 - m >>= 1; 2116 - break; 2117 - } 2118 - *(*samp)++ = (uint16_t)m; 2119 - *(*samp)++ = (uint16_t)m; 2120 - } /* to_mono */ 2121 2121 2122 2122 do 2123 2123 {