1
0
Fork 0
forked from len0rd/rockbox

sims have no MAS, hence no mas_codec_readreg()

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13076 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Kukla 2007-04-08 16:19:28 +00:00
parent 357a4182a7
commit 5b7d21f092

View file

@ -235,16 +235,19 @@ int plugin_main(void)
rb->sleep(1);
rb->lcd_clear_display();
#if ((CONFIG_CODEC == SWCODEC) || !defined(SIMULATOR) && \
((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)))
/* This will make the stars pulse to the music */
if(pulse==true){
/* Get the peaks. ( Borrowed from vu_meter ) */
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int left_peak = rb->mas_codec_readreg(0xC);
int right_peak = rb->mas_codec_readreg(0xD);
#elif (CONFIG_CODEC == SWCODEC)
#if (CONFIG_CODEC == SWCODEC)
int left_peak, right_peak;
rb->pcm_calculate_peaks(&left_peak, &right_peak);
#else
int left_peak = rb->mas_codec_readreg(0xC);
int right_peak = rb->mas_codec_readreg(0xD);
#endif
/* Devide peak data by 4098 to bring the max
value down from ~32k to 8 */
@ -270,7 +273,9 @@ int plugin_main(void)
starfield.z_move = avg_peak;
} /* if pulse */
#else
(void) avg_peak;
#endif
starfield_move_and_draw(&starfield);
#ifdef HAVE_LCD_COLOR