forked from len0rd/rockbox
plugins: make local functions static for metronome, rockblox1d, wavview
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30711 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d1e5c74ca8
commit
b01d8fa071
3 changed files with 14 additions and 14 deletions
|
|
@ -710,7 +710,7 @@ bool need_to_play = false;
|
||||||
short sndbuf[sizeof(sound)*2];
|
short sndbuf[sizeof(sound)*2];
|
||||||
|
|
||||||
/* Convert the mono "tock" sample to interleaved stereo */
|
/* Convert the mono "tock" sample to interleaved stereo */
|
||||||
void prepare_tock(void)
|
static void prepare_tock(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = 0;i < (int)sizeof(sound)/2;i++) {
|
for(i = 0;i < (int)sizeof(sound)/2;i++) {
|
||||||
|
|
@ -719,20 +719,20 @@ void prepare_tock(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void play_tock(void)
|
static void play_tock(void)
|
||||||
{
|
{
|
||||||
rb->pcm_play_data(NULL,(unsigned char *)sndbuf,sizeof(sndbuf));
|
rb->pcm_play_data(NULL,(unsigned char *)sndbuf,sizeof(sndbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_CODEC != SWCODEC */
|
#endif /* CONFIG_CODEC != SWCODEC */
|
||||||
|
|
||||||
void calc_period(void)
|
static void calc_period(void)
|
||||||
{
|
{
|
||||||
period = 61440/bpm-1; /* (60*1024)/bpm; */
|
period = 61440/bpm-1; /* (60*1024)/bpm; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void metronome_draw(struct screen* display)
|
static void metronome_draw(struct screen* display)
|
||||||
{
|
{
|
||||||
display->clear_display();
|
display->clear_display();
|
||||||
|
|
||||||
|
|
@ -779,7 +779,7 @@ void metronome_draw(struct screen* display)
|
||||||
display->update();
|
display->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_display(void)
|
static void draw_display(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
|
|
@ -788,7 +788,7 @@ void draw_display(void)
|
||||||
|
|
||||||
/* helper function to change the volume by a certain amount, +/-
|
/* helper function to change the volume by a certain amount, +/-
|
||||||
ripped from video.c */
|
ripped from video.c */
|
||||||
void change_volume(int delta)
|
static void change_volume(int delta)
|
||||||
{
|
{
|
||||||
int minvol = rb->sound_min(SOUND_VOLUME);
|
int minvol = rb->sound_min(SOUND_VOLUME);
|
||||||
int maxvol = rb->sound_max(SOUND_VOLUME);
|
int maxvol = rb->sound_max(SOUND_VOLUME);
|
||||||
|
|
@ -804,7 +804,7 @@ void change_volume(int delta)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*function to accelerate bpm change*/
|
/*function to accelerate bpm change*/
|
||||||
void change_bpm(int direction)
|
static void change_bpm(int direction)
|
||||||
{
|
{
|
||||||
if((bpm_step_counter < 20)
|
if((bpm_step_counter < 20)
|
||||||
|| (bpm > 389)
|
|| (bpm > 389)
|
||||||
|
|
@ -822,7 +822,7 @@ void change_bpm(int direction)
|
||||||
bpm_step_counter++;
|
bpm_step_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void timer_callback(void)
|
static void timer_callback(void)
|
||||||
{
|
{
|
||||||
if(minitick >= period){
|
if(minitick >= period){
|
||||||
minitick = 0;
|
minitick = 0;
|
||||||
|
|
@ -847,7 +847,7 @@ void timer_callback(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanup(void)
|
static void cleanup(void)
|
||||||
{
|
{
|
||||||
rb->timer_unregister();
|
rb->timer_unregister();
|
||||||
MET_PLAY_STOP; /* stop audio ISR */
|
MET_PLAY_STOP; /* stop audio ISR */
|
||||||
|
|
@ -857,7 +857,7 @@ void cleanup(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap(void)
|
static void tap(void)
|
||||||
{
|
{
|
||||||
if (tap_count == 0 || tap_time < tap_count) {
|
if (tap_count == 0 || tap_time < tap_count) {
|
||||||
tap_time = 0;
|
tap_time = 0;
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@
|
||||||
# define NEXT_Y (int)((LCD_HEIGHT * 0.8)/2-NEXT_H/2)
|
# define NEXT_Y (int)((LCD_HEIGHT * 0.8)/2-NEXT_H/2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void draw_brick(int pos, int length) {
|
static void draw_brick(int pos, int length) {
|
||||||
int i = pos;
|
int i = pos;
|
||||||
rb->lcd_set_drawmode(DRMODE_BG|DRMODE_INVERSEVID);
|
rb->lcd_set_drawmode(DRMODE_BG|DRMODE_INVERSEVID);
|
||||||
rb->lcd_fillrect(CENTER_X, CENTER_Y, WIDTH, WIDTH * TILES + TILES);
|
rb->lcd_fillrect(CENTER_X, CENTER_Y, WIDTH, WIDTH * TILES + TILES);
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ static uint32_t center = 0;
|
||||||
static uint32_t ppp = 1;
|
static uint32_t ppp = 1;
|
||||||
|
|
||||||
/* helper function copied from libwavpack bits.c */
|
/* helper function copied from libwavpack bits.c */
|
||||||
void little_endian_to_native (void *data, char *format)
|
static void little_endian_to_native (void *data, char *format)
|
||||||
{
|
{
|
||||||
unsigned char *cp = (unsigned char *) data;
|
unsigned char *cp = (unsigned char *) data;
|
||||||
|
|
||||||
|
|
@ -262,7 +262,7 @@ static int readwavpeaks(const char *filename)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int displaypeaks(void)
|
static int displaypeaks(void)
|
||||||
{
|
{
|
||||||
register int x = 0;
|
register int x = 0;
|
||||||
register int lymin = INT_MAX;
|
register int lymin = INT_MAX;
|
||||||
|
|
@ -334,7 +334,7 @@ int displaypeaks(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_help(void)
|
static void show_help(void)
|
||||||
{
|
{
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
rb->lcd_puts(0, 0, "WAVVIEW USAGE:");
|
rb->lcd_puts(0, 0, "WAVVIEW USAGE:");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue