summaryrefslogtreecommitdiff
path: root/apps/plugins/starfield.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/starfield.c')
-rw-r--r--apps/plugins/starfield.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c
index 30b01b2645..dff3c4b4d1 100644
--- a/apps/plugins/starfield.c
+++ b/apps/plugins/starfield.c
@@ -220,23 +220,17 @@ static int plugin_main(void)
220 rb->sleep(1); 220 rb->sleep(1);
221 rb->lcd_clear_display(); 221 rb->lcd_clear_display();
222 222
223#if ((CONFIG_CODEC == SWCODEC) || !defined(SIMULATOR) && \ 223#if (CONFIG_CODEC == SWCODEC)
224 ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)))
225
226 /* This will make the stars pulse to the music */ 224 /* This will make the stars pulse to the music */
227 if(pulse){ 225 if(pulse){
228 226
229 /* Get the peaks. ( Borrowed from vu_meter ) */ 227 /* Get the peaks. ( Borrowed from vu_meter ) */
230#if (CONFIG_CODEC == SWCODEC)
231 static struct pcm_peaks peaks; 228 static struct pcm_peaks peaks;
232 rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, 229 rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
233 &peaks); 230 &peaks);
234 #define left_peak peaks.left 231 #define left_peak peaks.left
235 #define right_peak peaks.right 232 #define right_peak peaks.right
236#else 233
237 int left_peak = rb->mas_codec_readreg(0xC);
238 int right_peak = rb->mas_codec_readreg(0xD);
239#endif
240 /* Devide peak data by 4098 to bring the max 234 /* Devide peak data by 4098 to bring the max
241 value down from ~32k to 8 */ 235 value down from ~32k to 8 */
242 left_peak = left_peak/0x1000; 236 left_peak = left_peak/0x1000;
@@ -261,8 +255,6 @@ static int plugin_main(void)
261 starfield.z_move = avg_peak; 255 starfield.z_move = avg_peak;
262 256
263 } /* if pulse */ 257 } /* if pulse */
264#else
265 (void) avg_peak;
266#endif 258#endif
267 starfield_move_and_draw(&starfield); 259 starfield_move_and_draw(&starfield);
268 260