mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
First step of the recording screen redesign. The screen is split into a fixed top part containing essential data and the peakmeters/triggerbar, and a bottom part that is in fact a list. The list contains the items that can be changed, and also some stuff that isn't important enough to be on the top part, like the filename. That filename is now shown completely. If the font is too big to have 6 lines on the display, sysfont is used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18202 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
729d259388
commit
496e1f7e85
6 changed files with 784 additions and 769 deletions
|
|
@ -47,7 +47,7 @@
|
|||
#if CONFIG_CODEC == SWCODEC
|
||||
#include "pcm.h"
|
||||
|
||||
#ifdef HAVE_RECORDING
|
||||
#ifdef HAVE_RECORDING
|
||||
#include "pcm_record.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ int calc_db (int isample)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return n + (m * (long)(isample - istart)) / 100L;
|
||||
}
|
||||
|
||||
|
|
@ -319,13 +319,13 @@ int peak_meter_db2sample(int db)
|
|||
/* range check: db value to big */
|
||||
if (max_peak_db + db < 0) {
|
||||
retval = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* range check: db value too small */
|
||||
else if (max_peak_db + db >= max_peak_db) {
|
||||
retval = MAX_PEAK -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* value in range: find the matching linear value */
|
||||
else {
|
||||
retval = db_to_sample_bin_search(0, MAX_PEAK, max_peak_db + db);
|
||||
|
|
@ -359,7 +359,7 @@ static void peak_meter_set_min(int newmin)
|
|||
}
|
||||
|
||||
pm_range = peak_meter_range_max - peak_meter_range_min;
|
||||
|
||||
|
||||
/* Avoid division by zero. */
|
||||
if (pm_range == 0) {
|
||||
pm_range = 1;
|
||||
|
|
@ -586,10 +586,10 @@ void peak_meter_peek(void)
|
|||
#if CONFIG_CODEC == SWCODEC
|
||||
if (pm_playback)
|
||||
pcm_calculate_peaks(&pm_cur_left, &pm_cur_right);
|
||||
#ifdef HAVE_RECORDING
|
||||
#ifdef HAVE_RECORDING
|
||||
else
|
||||
pcm_calculate_rec_peaks(&pm_cur_left, &pm_cur_right);
|
||||
#endif
|
||||
#endif
|
||||
left = pm_cur_left;
|
||||
right = pm_cur_right;
|
||||
#else
|
||||
|
|
@ -812,7 +812,7 @@ static int peak_meter_read_l(void)
|
|||
/* reset pm_max_left so that subsequent calls of peak_meter_peek don't
|
||||
get fooled by an old maximum value */
|
||||
pm_max_left = pm_cur_left;
|
||||
|
||||
|
||||
#if defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
|
||||
srand(current_tick);
|
||||
retval = rand()%MAX_PEAK;
|
||||
|
|
@ -1328,8 +1328,8 @@ void peak_meter_draw_trig(int xpos[], int ypos[],
|
|||
}
|
||||
#endif
|
||||
|
||||
int peak_meter_draw_get_btn(int action_context, int x, int y[],
|
||||
int height, int nb_screens)
|
||||
int peak_meter_draw_get_btn(int action_context, int x[], int y[],
|
||||
int height[], int nb_screens)
|
||||
{
|
||||
int button = BUTTON_NONE;
|
||||
long next_refresh = current_tick;
|
||||
|
|
@ -1362,10 +1362,10 @@ int peak_meter_draw_get_btn(int action_context, int x, int y[],
|
|||
if (TIME_AFTER(current_tick, next_refresh)) {
|
||||
for(i = 0; i < nb_screens; i++)
|
||||
{
|
||||
peak_meter_screen(&screens[i], x, y[i], height);
|
||||
screens[i].update_viewport_rect(x, y[i],
|
||||
screens[i].getwidth() - x,
|
||||
height);
|
||||
peak_meter_screen(&screens[i], x[i], y[i], height[i]);
|
||||
screens[i].update_viewport_rect(x[i], y[i],
|
||||
screens[i].getwidth() - x[i],
|
||||
height[i]);
|
||||
}
|
||||
next_refresh += HZ / PEAK_METER_FPS;
|
||||
dopeek = true;
|
||||
|
|
@ -1430,3 +1430,4 @@ bool peak_meter_histogram(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ extern void pm_activate_clipcount(bool active);
|
|||
extern bool peak_meter_enabled;
|
||||
|
||||
extern void peak_meter_playback(bool playback);
|
||||
extern int peak_meter_draw_get_btn(int action_context, int x, int y[],
|
||||
int height, int nb_screens);
|
||||
extern int peak_meter_draw_get_btn(int action_context, int x[], int y[],
|
||||
int height[], int nb_screens);
|
||||
extern void peak_meter_set_clip_hold(int time);
|
||||
extern void peak_meter_peek(void);
|
||||
extern void peak_meter_init_range( bool dbfs, int range_min, int range_max);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue