forked from len0rd/rockbox
Even more optimizing for the recording name change...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14148 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
83c003dbcc
commit
c21abddaae
2 changed files with 22 additions and 22 deletions
|
|
@ -601,37 +601,36 @@ static bool check_dir(char *folder)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* the list below must match enum audio_sources in audio.h */
|
||||
static const char* const prestr[] =
|
||||
{
|
||||
#ifdef HAVE_MIC_IN
|
||||
"R_MIC_",
|
||||
#endif
|
||||
#ifdef HAVE_LINE_REC
|
||||
"R_LINE_",
|
||||
#endif
|
||||
#ifdef HAVE_SPDIF_IN
|
||||
"R_SPDIF_",
|
||||
#endif
|
||||
#ifdef HAVE_FMRADIO_REC
|
||||
"R_FM_",
|
||||
#endif
|
||||
};
|
||||
|
||||
char *rec_create_filename(char *buffer)
|
||||
{
|
||||
char ext[16];
|
||||
char *pref = "R_";
|
||||
const char *pref = "R_";
|
||||
|
||||
strcpy(buffer,global_settings.rec_directory);
|
||||
if (!check_dir(buffer))
|
||||
return NULL;
|
||||
|
||||
switch(global_settings.rec_source)
|
||||
if((global_settings.rec_source > AUDIO_SRC_PLAYBACK) &&
|
||||
(global_settings.rec_source < AUDIO_NUM_SOURCES))
|
||||
{
|
||||
#ifdef HAVE_MIC_IN
|
||||
case AUDIO_SRC_MIC:
|
||||
pref = "R_MIC_";
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LINE_REC
|
||||
case AUDIO_SRC_LINEIN:
|
||||
pref = "R_LINE_";
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_FMRADIO_REC
|
||||
case AUDIO_SRC_FMRADIO:
|
||||
pref = "R_FM_";
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_SPDIF_IN
|
||||
case AUDIO_SRC_SPDIF:
|
||||
pref = "R_SPDIF_";
|
||||
break;
|
||||
#endif
|
||||
pref = prestr[global_settings.rec_source];
|
||||
}
|
||||
|
||||
snprintf(ext, sizeof(ext), ".%s",
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ enum rec_channel_modes
|
|||
#define CHN_CAP_ALL (CHN_CAP_STEREO | CHN_CAP_MONO)
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
/* the enums below must match prestr[] in recording.c */
|
||||
enum audio_sources
|
||||
{
|
||||
AUDIO_SRC_PLAYBACK = -1, /* Virtual source */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue