summaryrefslogtreecommitdiff
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
parent160d9f69086140b058726069b36ccdb98685c863 (diff)
downloadrockbox-bda8a963ad0ce49f67cb6641bb3b966f770366f3.tar.gz
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
-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[] = {
92 "Synthpop" 92 "Synthpop"
93}; 93};
94 94
95#if CONFIG_CODEC != SWCODEC
96static
97#endif
95char* id3_get_num_genre(unsigned int genre_num) 98char* id3_get_num_genre(unsigned int genre_num)
96{ 99{
97 if (genre_num < ARRAYLEN(genres)) 100 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 @@
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#if CONFIG_CODEC == SWCODEC
22char* id3_get_num_genre(unsigned int genre_num); 23char* id3_get_num_genre(unsigned int genre_num);
24#endif
23int getid3v2len(int fd); 25int getid3v2len(int fd);
24bool setid3v1title(int fd, struct mp3entry *entry); 26bool setid3v1title(int fd, struct mp3entry *entry);
25void setid3v2title(int fd, struct mp3entry *entry); 27void setid3v2title(int fd, struct mp3entry *entry);
26bool get_mp3_metadata(int fd, struct mp3entry* id3); 28bool get_mp3_metadata(int fd, struct mp3entry* id3);
29#if CONFIG_CODEC == SWCODEC
27bool get_adx_metadata(int fd, struct mp3entry* id3); 30bool get_adx_metadata(int fd, struct mp3entry* id3);
28bool get_aiff_metadata(int fd, struct mp3entry* id3); 31bool get_aiff_metadata(int fd, struct mp3entry* id3);
29bool get_flac_metadata(int fd, struct mp3entry* id3); 32bool get_flac_metadata(int fd, struct mp3entry* id3);
@@ -53,3 +56,4 @@ bool get_hes_metadata(int fd, struct mp3entry* id3);
53bool get_sgc_metadata(int fd, struct mp3entry* id3); 56bool get_sgc_metadata(int fd, struct mp3entry* id3);
54bool get_vgm_metadata(int fd, struct mp3entry* id3); 57bool get_vgm_metadata(int fd, struct mp3entry* id3);
55bool get_kss_metadata(int fd, struct mp3entry* id3); 58bool get_kss_metadata(int fd, struct mp3entry* id3);
59#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)
1068 return steps; 1068 return steps;
1069} 1069}
1070 1070
1071#if CONFIG_CODEC == SWCODEC
1071/* Marks the index of the track to be skipped that is "steps" away from 1072/* Marks the index of the track to be skipped that is "steps" away from
1072 * current playing track. 1073 * current playing track.
1073 */ 1074 */
@@ -1089,6 +1090,7 @@ void playlist_skip_entry(struct playlist_info *playlist, int steps)
1089 1090
1090 playlist->indices[index] |= PLAYLIST_SKIPPED; 1091 playlist->indices[index] |= PLAYLIST_SKIPPED;
1091} 1092}
1093#endif /* CONFIG_CODEC == SWCODEC */
1092 1094
1093/* 1095/*
1094 * returns the index of the track that is "steps" away from current playing 1096 * returns the index of the track that is "steps" away from current playing
@@ -2638,6 +2640,7 @@ int playlist_next(int steps)
2638 return index; 2640 return index;
2639} 2641}
2640 2642
2643#if CONFIG_CODEC == SWCODEC
2641/* try playing next or previous folder */ 2644/* try playing next or previous folder */
2642bool playlist_next_dir(int direction) 2645bool playlist_next_dir(int direction)
2643{ 2646{
@@ -2647,6 +2650,7 @@ bool playlist_next_dir(int direction)
2647 2650
2648 return create_and_play_dir(direction, false) >= 0; 2651 return create_and_play_dir(direction, false) >= 0;
2649} 2652}
2653#endif /* CONFIG_CODEC == SWCODEC */
2650 2654
2651/* Get resume info for current playing song. If return value is -1 then 2655/* Get resume info for current playing song. If return value is -1 then
2652 settings shouldn't be saved. */ 2656 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);
134bool playlist_check(int steps); 134bool playlist_check(int steps);
135const char *playlist_peek(int steps, char* buf, size_t buf_size); 135const char *playlist_peek(int steps, char* buf, size_t buf_size);
136int playlist_next(int steps); 136int playlist_next(int steps);
137#if CONFIG_CODEC == SWCODEC
137bool playlist_next_dir(int direction); 138bool playlist_next_dir(int direction);
139#endif
138int playlist_get_resume_info(int *resume_index); 140int playlist_get_resume_info(int *resume_index);
139int playlist_update_resume_info(const struct mp3entry* id3); 141int playlist_update_resume_info(const struct mp3entry* id3);
140int playlist_get_display_index(void); 142int playlist_get_display_index(void);
@@ -158,7 +160,9 @@ int playlist_insert_directory(struct playlist_info* playlist,
158 bool recurse); 160 bool recurse);
159int playlist_insert_playlist(struct playlist_info* playlist, const char *filename, 161int playlist_insert_playlist(struct playlist_info* playlist, const char *filename,
160 int position, bool queue); 162 int position, bool queue);
163#if CONFIG_CODEC == SWCODEC
161void playlist_skip_entry(struct playlist_info *playlist, int steps); 164void playlist_skip_entry(struct playlist_info *playlist, int steps);
165#endif
162int playlist_delete(struct playlist_info* playlist, int index); 166int playlist_delete(struct playlist_info* playlist, int index);
163int playlist_move(struct playlist_info* playlist, int index, int new_index); 167int playlist_move(struct playlist_info* playlist, int index, int new_index);
164int playlist_randomise(struct playlist_info* playlist, unsigned int seed, 168int 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,
957 return 0; 957 return 0;
958} 958}
959 959
960#if CONFIG_CODEC == SWCODEC
960/* Play a directory's .talk thumbnail, fallback to spelling the filename, or 961/* Play a directory's .talk thumbnail, fallback to spelling the filename, or
961 go straight to spelling depending on settings. */ 962 go straight to spelling depending on settings. */
962int talk_dir_or_spell(const char* dirname, 963int talk_dir_or_spell(const char* dirname,
@@ -973,6 +974,7 @@ int talk_dir_or_spell(const char* dirname,
973 return talk_spell_basename(dirname, prefix_ids, enqueue); 974 return talk_spell_basename(dirname, prefix_ids, enqueue);
974 return 0; 975 return 0;
975} 976}
977#endif
976 978
977/* say a numeric value, this word ordering works for english, 979/* say a numeric value, this word ordering works for english,
978 but not necessarily for other languages (e.g. german) */ 980 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,
90/* play file's thumbnail or spell name */ 90/* play file's thumbnail or spell name */
91int talk_file_or_spell(const char *dirname, const char* filename, 91int talk_file_or_spell(const char *dirname, const char* filename,
92 const long *prefix_ids, bool enqueue); 92 const long *prefix_ids, bool enqueue);
93#if CONFIG_CODEC == SWCODEC
93/* play dir's thumbnail or spell name */ 94/* play dir's thumbnail or spell name */
94int talk_dir_or_spell(const char* filename, 95int talk_dir_or_spell(const char* filename,
95 const long *prefix_ids, bool enqueue); 96 const long *prefix_ids, bool enqueue);
97#endif
96int talk_number(long n, bool enqueue); /* say a number */ 98int talk_number(long n, bool enqueue); /* say a number */
97int talk_value(long n, int unit, bool enqueue); /* say a numeric value */ 99int talk_value(long n, int unit, bool enqueue); /* say a numeric value */
98int talk_value_decimal(long n, int unit, int decimals, bool enqueue); 100int talk_value_decimal(long n, int unit, int decimals, bool enqueue);