diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-08-02 10:40:47 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-08-02 10:40:47 +0000 |
commit | 31ff52cee6c57cf380a34706fe94fbfa271c2160 (patch) | |
tree | ce334d295c34a9a6f94c1bd0e39b5baaaf8842e7 /apps | |
parent | 2ff816fab6df92904baf665c1493e8d1ffdece0f (diff) |
Simplify the source based recording file names a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14136 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/recorder/recording.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 8213bce53c..0ab894604c 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -604,7 +604,8 @@ static bool check_dir(char *folder) char *rec_create_filename(char *buffer) { char ext[16]; - char pref[9]; + char *pref = "R_"; + strcpy(buffer,global_settings.rec_directory); if (!check_dir(buffer)) return NULL; @@ -613,28 +614,24 @@ char *rec_create_filename(char *buffer) { #ifdef HAVE_MIC_IN case AUDIO_SRC_MIC: - snprintf(pref, 9, "R_MIC_"); + pref = "R_MIC_"; break; #endif #ifdef HAVE_LINE_REC case AUDIO_SRC_LINEIN: - snprintf(pref, 9, "R_LINE_"); + pref = "R_LINE_"; break; #endif #ifdef HAVE_FMRADIO_REC case AUDIO_SRC_FMRADIO: - snprintf(pref, 9, "R_FM_"); + pref = "R_FM_"; break; #endif #ifdef HAVE_SPDIF_IN case AUDIO_SRC_SPDIF: - snprintf(pref, 9, "R_SPDIF_"); + pref = "R_SPDIF_"; break; #endif - default: - /* this should never happen */ - snprintf(pref, 9, "R_"); - break; } snprintf(ext, sizeof(ext), ".%s", |