Index: apps/recorder/peakmeter.c
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/peakmeter.c,v
retrieving revision 1.34
diff -u -r1.34 peakmeter.c
--- apps/recorder/peakmeter.c	3 Apr 2006 08:20:20 -0000	1.34
+++ apps/recorder/peakmeter.c	26 Jun 2006 10:47:31 -0000
@@ -1175,7 +1175,7 @@
 }
 #endif
 
-int peak_meter_draw_get_btn(int x, int y, int height)
+int peak_meter_draw_get_btn(int x, int y[], int height)
 {
     int button = BUTTON_NONE;
     long next_refresh = current_tick;
@@ -1203,8 +1203,8 @@
         if (TIME_AFTER(current_tick, next_refresh)) {
             FOR_NB_SCREENS(i)
             {
-                peak_meter_screen(&screens[i], x, y, height);
-                screens[i].update_rect(x, y, screens[i].width, height);
+                peak_meter_screen(&screens[i], x, y[i], height);
+                screens[i].update_rect(x, y[i], screens[i].width, height);
             }
             next_refresh += HZ / PEAK_METER_FPS;
             dopeek = true;
Index: apps/recorder/peakmeter.h
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/peakmeter.h,v
retrieving revision 1.7
diff -u -r1.7 peakmeter.h
--- apps/recorder/peakmeter.h	25 Mar 2006 13:35:31 -0000	1.7
+++ apps/recorder/peakmeter.h	26 Jun 2006 10:47:31 -0000
@@ -29,7 +29,7 @@
 extern bool peak_meter_enabled;
 
 extern void peak_meter_playback(bool playback);
-extern int  peak_meter_draw_get_btn(int x, int y, int height);
+extern int  peak_meter_draw_get_btn(int x, int y[], int height);
 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);
Index: apps/recorder/recording.c
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/recording.c,v
retrieving revision 1.111
diff -u -r1.111 recording.c
--- apps/recorder/recording.c	14 May 2006 23:34:24 -0000	1.111
+++ apps/recorder/recording.c	26 Jun 2006 10:47:35 -0000
@@ -91,7 +91,8 @@
 #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
 #define REC_SHUTDOWN (BUTTON_OFF | BUTTON_REPEAT)
 #define REC_STOPEXIT BUTTON_OFF
-#define REC_RECPAUSE BUTTON_REC
+#define REC_RECPAUSE BUTTON_ON
+#define REC_RECNEW BUTTON_REC
 #define REC_INC BUTTON_RIGHT
 #define REC_DEC BUTTON_LEFT
 #define REC_NEXT BUTTON_DOWN
@@ -110,6 +111,7 @@
 #define REC_RC_SHUTDOWN (BUTTON_RC_STOP | BUTTON_REPEAT)
 #define REC_RC_STOPEXIT BUTTON_RC_STOP
 #define REC_RC_RECPAUSE BUTTON_RC_ON
+#define REC_RC_RECNEW BUTTON_RC_REC
 #define REC_RC_INC BUTTON_RC_BITRATE
 #define REC_RC_DEC BUTTON_RC_SOURCE
 #define REC_RC_NEXT BUTTON_RC_FF
@@ -325,7 +327,8 @@
     bool have_recorded = false;
     unsigned int seconds;
     int hours, minutes;
-    char path_buffer[MAX_PATH];
+    char path_buffer[MAX_PATH]="";
+    char filename[13];
     bool been_in_usb_mode = false;
     int last_audio_stat = -1;
     int audio_stat;
@@ -334,6 +337,8 @@
     int led_countdown = 2;
 #endif
     int i;
+    int filename_offset[NB_SCREENS];
+    int pm_y[NB_SCREENS];
 
     const unsigned char *byte_units[] = {
         ID2P(LANG_BYTE),
@@ -392,6 +397,8 @@
         screens[i].setfont(FONT_SYSFIXED);
         screens[i].getstringsize("M", &w, &h);
         screens[i].setmargins(global_settings.invert_cursor ? 0 : w, 8);
+        filename_offset[i] = ((screens[i].height >= 80) ? 1 : 0);
+        pm_y[i] = 8 + h * (2 + filename_offset[i]);
     }
     
     if(rec_create_directory() > 0)
@@ -453,7 +460,7 @@
 #endif /* CONFIG_LED */
 
         /* Wait for a button a while (HZ/10) drawing the peak meter */
-        button = peak_meter_draw_get_btn(0, 8 + h*2, h * PM_HEIGHT);
+        button = peak_meter_draw_get_btn(0, pm_y, h * PM_HEIGHT);
 
         if (last_audio_stat != audio_stat)
         {
@@ -547,6 +554,50 @@
                 update_countdown = 1; /* Update immediately */
                 break;
 
+#ifdef REC_RECNEW            
+            case REC_RECNEW:
+#ifdef REC_RC_RECNEW
+            case REC_RC_RECNEW:
+#endif
+                /*If not already recording, start recording*/
+                if(!(audio_stat & AUDIO_STATUS_RECORD))
+                {
+                    /* is this manual or triggered recording? */
+                    if ((global_settings.rec_trigger_mode == TRIG_MODE_OFF) ||
+                        (peak_meter_trigger_status() != TRIG_OFF))
+                    {
+                        /* manual recording */
+                        have_recorded = true;
+                        talk_buffer_steal(); /* we use the mp3 buffer */
+                        audio_record(rec_create_filename(path_buffer));
+                        last_seconds = 0;
+                        if (global_settings.talk_menu)
+                        {   /* no voice possible here, but a beep */
+                            audio_beep(HZ/2); /* longer beep on start */
+                        }
+                    }
+
+                    /* this is triggered recording */
+                    else
+                    {
+                        /* we don't start recording now, but enable the
+                           trigger and let the callback function
+                           trigger_listener control when the recording starts */
+                        peak_meter_trigger(true);
+                        peak_meter_set_trigger_listener(&trigger_listener);
+                    }
+                }
+                /*if already recording, start new file*/
+                else
+                {
+                    audio_new_file(rec_create_filename(path_buffer));
+                    last_seconds = 0;
+                }
+
+            update_countdown = 1; /* Update immediately */
+            break;
+#endif 
+         
 #ifdef REC_PREV
             case REC_PREV:
 #ifdef REC_RC_PREV
@@ -827,6 +878,17 @@
             FOR_NB_SCREENS(i)
                 screens[i].puts(0, 1, buf);
 
+            FOR_NB_SCREENS(i)
+            {
+                if (filename_offset[i] > 0)
+                {
+                    strncpy(filename, path_buffer + strlen(path_buffer) - 12, 13);
+                    filename[12]='\0';
+                    snprintf(buf, 32, "Filename: %s", filename);
+                    screens[i].puts(0, 2, buf);         
+                }
+            }
+
             /* We will do file splitting regardless, either at the end of
                a split interval, or when the filesize approaches the 2GB
                FAT file size (compatibility) limit. */
@@ -847,13 +909,13 @@
             if (global_settings.invert_cursor && (pos++ == cursor))
             {
                 FOR_NB_SCREENS(i)
-                    screens[i].puts_style_offset(0, 2+PM_HEIGHT, buf,
+                    screens[i].puts_style_offset(0, filename_offset[i] + PM_HEIGHT + 2, buf,
                                                  STYLE_INVERT,0);
             }
             else
             {
                 FOR_NB_SCREENS(i)
-                    screens[i].puts(0, 2+PM_HEIGHT, buf);
+                    screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 2, buf);
             }                
 
             if(global_settings.rec_source == SOURCE_MIC)
@@ -865,13 +927,13 @@
                 if(global_settings.invert_cursor && ((1==cursor)||(2==cursor)))
                 {
                     FOR_NB_SCREENS(i)
-                        screens[i].puts_style_offset(0, 3+PM_HEIGHT, buf,
+                        screens[i].puts_style_offset(0, filename_offset[i] + PM_HEIGHT + 3, buf,
                                                      STYLE_INVERT,0);
                 }
                 else
                 {
                     FOR_NB_SCREENS(i)
-                        screens[i].puts(0, 3+PM_HEIGHT, buf);
+                        screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 3, buf);
                 }
             }
             else if(global_settings.rec_source == SOURCE_LINE)
@@ -884,13 +946,13 @@
                 if(global_settings.invert_cursor && ((1==cursor)||(2==cursor)))
                 {
                     FOR_NB_SCREENS(i)
-                        screens[i].puts_style_offset(0, 3+PM_HEIGHT, buf,
+                        screens[i].puts_style_offset(0, filename_offset[i] + PM_HEIGHT + 3, buf,
                                                      STYLE_INVERT,0);
                 }
                 else
                 {
                      FOR_NB_SCREENS(i)
-                         screens[i].puts(0, 3+PM_HEIGHT, buf);
+                         screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 3, buf);
                 }                
 
                 snprintf(buf, 32, "%s:%s",
@@ -901,14 +963,15 @@
                 if(global_settings.invert_cursor && ((1==cursor)||(3==cursor)))
                 {
                     FOR_NB_SCREENS(i)
-                        screens[i].puts_style_offset(0, 4+PM_HEIGHT, buf,
+                        screens[i].puts_style_offset(0, filename_offset[i] + PM_HEIGHT + 4, buf,
                                                      STYLE_INVERT,0);
                 }
                 else
                 {
                     FOR_NB_SCREENS(i)
-                        screens[i].puts(0, 4+PM_HEIGHT, buf);
+                        screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 4, buf);
                 }                
+
             }
 
             if(!global_settings.invert_cursor){
@@ -917,29 +980,29 @@
                     case 1:
                         FOR_NB_SCREENS(i)
                             screen_put_cursorxy(&screens[i], 0,
-                                                3+PM_HEIGHT, true);
+                                                 filename_offset[i] + PM_HEIGHT + 3, true);
 
                         if(global_settings.rec_source != SOURCE_MIC)
                         {
                             FOR_NB_SCREENS(i)
                                 screen_put_cursorxy(&screens[i], 0, 
-                                                    4+PM_HEIGHT, true);
+                                                     filename_offset[i] + PM_HEIGHT + 4, true);
                         }
                     break;
                     case 2:
                         FOR_NB_SCREENS(i)
                             screen_put_cursorxy(&screens[i], 0, 
-                                                3+PM_HEIGHT, true);
+                                                 filename_offset[i] + PM_HEIGHT + 3, true);
                     break;
                     case 3:
                         FOR_NB_SCREENS(i)
                             screen_put_cursorxy(&screens[i], 0, 
-                                                4+PM_HEIGHT, true);
+                                                 filename_offset[i] + PM_HEIGHT + 4, true);
                     break;
                     default:
                         FOR_NB_SCREENS(i)
                             screen_put_cursorxy(&screens[i], 0, 
-                                                2+PM_HEIGHT, true);
+                                                 filename_offset[i] + PM_HEIGHT + 2, true);
                 }
             }
 /* Can't measure S/PDIF sample rate on Archos yet */
@@ -958,13 +1021,13 @@
                      global_settings.rec_channels ?
                      str(LANG_CHANNEL_MONO) : str(LANG_CHANNEL_STEREO));
             FOR_NB_SCREENS(i)
-                screens[i].puts(0, 5+PM_HEIGHT, buf);
+                screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 5, buf);
 
             gui_syncstatusbar_draw(&statusbars, true);
 
             FOR_NB_SCREENS(i)
             {
-                peak_meter_screen(&screens[i], 0, 8 + h*2, h*PM_HEIGHT);
+                peak_meter_screen(&screens[i], 0, pm_y[i], h*PM_HEIGHT);
                 screens[i].update();                
             }
 
