summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2011-12-15 20:58:14 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2011-12-15 20:58:14 +0000
commitbda8a963ad0ce49f67cb6641bb3b966f770366f3 (patch)
treefba921269db2805edb4e837bf204e033874ff9fa /apps
parent160d9f69086140b058726069b36ccdb98685c863 (diff)
downloadrockbox-bda8a963ad0ce49f67cb6641bb3b966f770366f3.tar.gz
rockbox-bda8a963ad0ce49f67cb6641bb3b966f770366f3.tar.bz2
rockbox-bda8a963ad0ce49f67cb6641bb3b966f770366f3.zip
Add conditionals for functions only needed on SWCODEC targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31296 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/metadata/id3tags.c3
-rw-r--r--apps/metadata/metadata_parsers.h4
-rw-r--r--apps/playlist.c4
-rw-r--r--apps/playlist.h4
-rw-r--r--apps/talk.c2
-rw-r--r--apps/talk.h2
6 files changed, 19 insertions, 0 deletions
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index 39365028fc..dcf71f71bf 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -92,6 +92,9 @@ static const char* const genres[] = {
"Synthpop"
};
+#if CONFIG_CODEC != SWCODEC
+static
+#endif
char* id3_get_num_genre(unsigned int genre_num)
{
if (genre_num < ARRAYLEN(genres))
diff --git a/apps/metadata/metadata_parsers.h b/apps/metadata/metadata_parsers.h
index adb7a82cd5..304e393538 100644
--- a/apps/metadata/metadata_parsers.h
+++ b/apps/metadata/metadata_parsers.h
@@ -19,11 +19,14 @@
*
****************************************************************************/
+#if CONFIG_CODEC == SWCODEC
char* id3_get_num_genre(unsigned int genre_num);
+#endif
int getid3v2len(int fd);
bool setid3v1title(int fd, struct mp3entry *entry);
void setid3v2title(int fd, struct mp3entry *entry);
bool get_mp3_metadata(int fd, struct mp3entry* id3);
+#if CONFIG_CODEC == SWCODEC
bool get_adx_metadata(int fd, struct mp3entry* id3);
bool get_aiff_metadata(int fd, struct mp3entry* id3);
bool get_flac_metadata(int fd, struct mp3entry* id3);
@@ -53,3 +56,4 @@ bool get_hes_metadata(int fd, struct mp3entry* id3);
bool get_sgc_metadata(int fd, struct mp3entry* id3);
bool get_vgm_metadata(int fd, struct mp3entry* id3);
bool get_kss_metadata(int fd, struct mp3entry* id3);
+#endif /* CONFIG_CODEC == SWCODEC */
diff --git a/apps/playlist.c b/apps/playlist.c
index 4588548d54..117d657ed1 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1068,6 +1068,7 @@ static int calculate_step_count(const struct playlist_info *playlist, int steps)
return steps;
}
+#if CONFIG_CODEC == SWCODEC
/* Marks the index of the track to be skipped that is "steps" away from
* current playing track.
*/
@@ -1089,6 +1090,7 @@ void playlist_skip_entry(struct playlist_info *playlist, int steps)
playlist->indices[index] |= PLAYLIST_SKIPPED;
}
+#endif /* CONFIG_CODEC == SWCODEC */
/*
* returns the index of the track that is "steps" away from current playing
@@ -2638,6 +2640,7 @@ int playlist_next(int steps)
return index;
}
+#if CONFIG_CODEC == SWCODEC
/* try playing next or previous folder */
bool playlist_next_dir(int direction)
{
@@ -2647,6 +2650,7 @@ bool playlist_next_dir(int direction)
return create_and_play_dir(direction, false) >= 0;
}
+#endif /* CONFIG_CODEC == SWCODEC */
/* Get resume info for current playing song. If return value is -1 then
settings shouldn't be saved. */
diff --git a/apps/playlist.h b/apps/playlist.h
index 6dd5535df1..4722be11c0 100644
--- a/apps/playlist.h
+++ b/apps/playlist.h
@@ -134,7 +134,9 @@ void playlist_start(int start_index, int offset);
bool playlist_check(int steps);
const char *playlist_peek(int steps, char* buf, size_t buf_size);
int playlist_next(int steps);
+#if CONFIG_CODEC == SWCODEC
bool playlist_next_dir(int direction);
+#endif
int playlist_get_resume_info(int *resume_index);
int playlist_update_resume_info(const struct mp3entry* id3);
int playlist_get_display_index(void);
@@ -158,7 +160,9 @@ int playlist_insert_directory(struct playlist_info* playlist,
bool recurse);
int playlist_insert_playlist(struct playlist_info* playlist, const char *filename,
int position, bool queue);
+#if CONFIG_CODEC == SWCODEC
void playlist_skip_entry(struct playlist_info *playlist, int steps);
+#endif
int playlist_delete(struct playlist_info* playlist, int index);
int playlist_move(struct playlist_info* playlist, int index, int new_index);
int playlist_randomise(struct playlist_info* playlist, unsigned int seed,
diff --git a/apps/talk.c b/apps/talk.c
index bfad99fbd2..ba2050a9ca 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -957,6 +957,7 @@ int talk_file_or_spell(const char *dirname, const char *filename,
return 0;
}
+#if CONFIG_CODEC == SWCODEC
/* Play a directory's .talk thumbnail, fallback to spelling the filename, or
go straight to spelling depending on settings. */
int talk_dir_or_spell(const char* dirname,
@@ -973,6 +974,7 @@ int talk_dir_or_spell(const char* dirname,
return talk_spell_basename(dirname, prefix_ids, enqueue);
return 0;
}
+#endif
/* say a numeric value, this word ordering works for english,
but not necessarily for other languages (e.g. german) */
diff --git a/apps/talk.h b/apps/talk.h
index e1702147c7..55e7208f1d 100644
--- a/apps/talk.h
+++ b/apps/talk.h
@@ -90,9 +90,11 @@ int talk_file(const char *root, const char *dir, const char *file,
/* play file's thumbnail or spell name */
int talk_file_or_spell(const char *dirname, const char* filename,
const long *prefix_ids, bool enqueue);
+#if CONFIG_CODEC == SWCODEC
/* play dir's thumbnail or spell name */
int talk_dir_or_spell(const char* filename,
const long *prefix_ids, bool enqueue);
+#endif
int talk_number(long n, bool enqueue); /* say a number */
int talk_value(long n, int unit, bool enqueue); /* say a numeric value */
int talk_value_decimal(long n, int unit, int decimals, bool enqueue);