? rockbox/build
? rockbox/apps/recorder/chip8.c
? rockbox/apps/recorder/chip8.h
Index: rockbox/apps/applimits.h
===================================================================
RCS file: /cvsroot/rockbox/apps/applimits.h,v
retrieving revision 1.2
diff -u -r1.2 applimits.h
--- rockbox/apps/applimits.h	9 Jan 2003 00:54:59 -0000	1.2
+++ rockbox/apps/applimits.h	11 Jan 2003 21:05:32 -0000
@@ -24,5 +24,6 @@
 #define MAX_DIR_LEVELS 10
 #define MAX_PLAYLIST_SIZE 10000
 #define MAX_QUEUED_FILES 100
+#define MAX_REC_FILENAME 32
 
 #endif
Index: rockbox/apps/settings.c
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.c,v
retrieving revision 1.103
diff -u -r1.103 settings.c
--- rockbox/apps/settings.c	9 Jan 2003 00:54:59 -0000	1.103
+++ rockbox/apps/settings.c	11 Jan 2003 21:05:33 -0000
@@ -121,6 +121,7 @@
 
 
 Rest of config block, only saved to disk:
+0x90  (char[32)) Record filename
 0xB0  peak meter clip hold timeout (bit 0-4)
 0xB1  peak meter release step size, peak_meter_dbfs (bit 7)
 0xB2  peak meter min either in -db or in percent
@@ -366,6 +367,7 @@
         config_block[0x29]=(unsigned char)(global_settings.topruntime >> 8);
     }
 
+    strncpy(&config_block[0x90], global_settings.rec_name, MAX_REC_FILENAME);
     config_block[0xb0] = (unsigned char)global_settings.peak_meter_clip_hold |
         (global_settings.peak_meter_performance ? 0x80 : 0);
     config_block[0xb1] = global_settings.peak_meter_release |
@@ -644,6 +646,10 @@
             global_settings.topruntime =
                 config_block[0x28] | (config_block[0x29] << 8);
 
+        if (config_block[0x90] != 0xff)
+            strncpy(global_settings.rec_name, &config_block[0x90],
+                    MAX_REC_FILENAME);
+
         global_settings.peak_meter_clip_hold = (config_block[0xb0]) & 0x1f;
         global_settings.peak_meter_performance = 
             (config_block[0xb0] & 0x80) != 0;
@@ -833,6 +839,7 @@
     global_settings.rec_mic_gain = 8;
     global_settings.rec_left_gain = 2; /* 0dB */
     global_settings.rec_right_gain = 2; /* 0dB */
+    global_settings.rec_name[0] = '\0';
     global_settings.resume      = RESUME_ASK;
     global_settings.contrast    = DEFAULT_CONTRAST_SETTING;
     global_settings.poweroff    = DEFAULT_POWEROFF_SETTING;
Index: rockbox/apps/settings.h
===================================================================
RCS file: /cvsroot/rockbox/apps/settings.h,v
retrieving revision 1.67
diff -u -r1.67 settings.h
--- rockbox/apps/settings.h	9 Jan 2003 00:54:59 -0000	1.67
+++ rockbox/apps/settings.h	11 Jan 2003 21:05:33 -0000
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include "file.h"
+#include "applimits.h"
 
 #define ROCKBOX_DIR "/.rockbox"
 
@@ -74,6 +75,7 @@
     int rec_mic_gain; /* 0-15 */
     int rec_left_gain; /* 0-15 */
     int rec_right_gain; /* 0-15 */
+    char rec_name[MAX_REC_FILENAME+1];
     
     /* device settings */
 
Index: rockbox/apps/sound_menu.c
===================================================================
RCS file: /cvsroot/rockbox/apps/sound_menu.c,v
retrieving revision 1.31
diff -u -r1.31 sound_menu.c
--- rockbox/apps/sound_menu.c	10 Nov 2002 23:18:33 -0000	1.31
+++ rockbox/apps/sound_menu.c	11 Jan 2003 21:05:33 -0000
@@ -31,6 +31,7 @@
 #include "icons.h"
 #endif
 #include "lang.h"
+#include "keyboard.h"
 
 static char *fmt[] =
 {
@@ -212,6 +213,11 @@
                       names, 2, NULL );
 }
 
+static bool recname(void)
+{
+    return kbd_input(global_settings.rec_name, MAX_REC_FILENAME);
+}
+
 static bool recquality(void)
 {
     return set_int(str(LANG_RECORDING_QUALITY), "",
@@ -267,6 +273,7 @@
         { str(LANG_RECORDING_FREQUENCY), recfrequency },
         { str(LANG_RECORDING_SOURCE), recsource },
         { str(LANG_RECORDING_CHANNELS), recchannels },
+        { str(LANG_RECORDING_NAME), recname },
     };
     
     m=menu_init( items, sizeof items / sizeof(struct menu_items) );
Index: rockbox/apps/lang/english.lang
===================================================================
RCS file: /cvsroot/rockbox/apps/lang/english.lang,v
retrieving revision 1.43
diff -u -r1.43 english.lang
--- rockbox/apps/lang/english.lang	9 Jan 2003 00:55:00 -0000	1.43
+++ rockbox/apps/lang/english.lang	11 Jan 2003 21:05:34 -0000
@@ -1236,3 +1236,8 @@
 desc: queue buffer full
 eng: "Queue buffer full"
 new:
+
+id: LANG_RECORDING_NAME
+desc: in the recording settings
+eng: "Filename"
+new:
Index: rockbox/apps/recorder/recording.c
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/recording.c,v
retrieving revision 1.13
diff -u -r1.13 recording.c
--- rockbox/apps/recorder/recording.c	18 Dec 2002 14:57:44 -0000	1.13
+++ rockbox/apps/recorder/recording.c	11 Jan 2003 21:05:34 -0000
@@ -136,13 +136,14 @@
 
 static char *create_filename(void)
 {
-    static char fname[32];
+    static char fname[64];
     struct tm * tm;
 
     tm = get_time();
 
     /* Create a filename: RYYMMDDHHMMSS.mp3 */
-    snprintf(fname, 32, "/R%02d%02d%02d%02d%02d%02d.mp3",
+    snprintf(fname, 64, "/%sR%02d%02d%02d%02d%02d%02d.mp3",
+             global_settings.rec_name,
              tm->tm_year-2000, tm->tm_mon, tm->tm_mday,
              tm->tm_hour, tm->tm_min, tm->tm_sec);


