diff options
author | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-15 20:58:14 +0000 |
---|---|---|
committer | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-15 20:58:14 +0000 |
commit | bda8a963ad0ce49f67cb6641bb3b966f770366f3 (patch) | |
tree | fba921269db2805edb4e837bf204e033874ff9fa | |
parent | 160d9f69086140b058726069b36ccdb98685c863 (diff) | |
download | rockbox-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.c | 3 | ||||
-rw-r--r-- | apps/metadata/metadata_parsers.h | 4 | ||||
-rw-r--r-- | apps/playlist.c | 4 | ||||
-rw-r--r-- | apps/playlist.h | 4 | ||||
-rw-r--r-- | apps/talk.c | 2 | ||||
-rw-r--r-- | apps/talk.h | 2 |
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 | ||
96 | static | ||
97 | #endif | ||
95 | char* id3_get_num_genre(unsigned int genre_num) | 98 | char* 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 | ||
22 | char* id3_get_num_genre(unsigned int genre_num); | 23 | char* id3_get_num_genre(unsigned int genre_num); |
24 | #endif | ||
23 | int getid3v2len(int fd); | 25 | int getid3v2len(int fd); |
24 | bool setid3v1title(int fd, struct mp3entry *entry); | 26 | bool setid3v1title(int fd, struct mp3entry *entry); |
25 | void setid3v2title(int fd, struct mp3entry *entry); | 27 | void setid3v2title(int fd, struct mp3entry *entry); |
26 | bool get_mp3_metadata(int fd, struct mp3entry* id3); | 28 | bool get_mp3_metadata(int fd, struct mp3entry* id3); |
29 | #if CONFIG_CODEC == SWCODEC | ||
27 | bool get_adx_metadata(int fd, struct mp3entry* id3); | 30 | bool get_adx_metadata(int fd, struct mp3entry* id3); |
28 | bool get_aiff_metadata(int fd, struct mp3entry* id3); | 31 | bool get_aiff_metadata(int fd, struct mp3entry* id3); |
29 | bool get_flac_metadata(int fd, struct mp3entry* id3); | 32 | bool get_flac_metadata(int fd, struct mp3entry* id3); |
@@ -53,3 +56,4 @@ bool get_hes_metadata(int fd, struct mp3entry* id3); | |||
53 | bool get_sgc_metadata(int fd, struct mp3entry* id3); | 56 | bool get_sgc_metadata(int fd, struct mp3entry* id3); |
54 | bool get_vgm_metadata(int fd, struct mp3entry* id3); | 57 | bool get_vgm_metadata(int fd, struct mp3entry* id3); |
55 | bool get_kss_metadata(int fd, struct mp3entry* id3); | 58 | bool 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 */ |
2642 | bool playlist_next_dir(int direction) | 2645 | bool 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); | |||
134 | bool playlist_check(int steps); | 134 | bool playlist_check(int steps); |
135 | const char *playlist_peek(int steps, char* buf, size_t buf_size); | 135 | const char *playlist_peek(int steps, char* buf, size_t buf_size); |
136 | int playlist_next(int steps); | 136 | int playlist_next(int steps); |
137 | #if CONFIG_CODEC == SWCODEC | ||
137 | bool playlist_next_dir(int direction); | 138 | bool playlist_next_dir(int direction); |
139 | #endif | ||
138 | int playlist_get_resume_info(int *resume_index); | 140 | int playlist_get_resume_info(int *resume_index); |
139 | int playlist_update_resume_info(const struct mp3entry* id3); | 141 | int playlist_update_resume_info(const struct mp3entry* id3); |
140 | int playlist_get_display_index(void); | 142 | int playlist_get_display_index(void); |
@@ -158,7 +160,9 @@ int playlist_insert_directory(struct playlist_info* playlist, | |||
158 | bool recurse); | 160 | bool recurse); |
159 | int playlist_insert_playlist(struct playlist_info* playlist, const char *filename, | 161 | int 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 | ||
161 | void playlist_skip_entry(struct playlist_info *playlist, int steps); | 164 | void playlist_skip_entry(struct playlist_info *playlist, int steps); |
165 | #endif | ||
162 | int playlist_delete(struct playlist_info* playlist, int index); | 166 | int playlist_delete(struct playlist_info* playlist, int index); |
163 | int playlist_move(struct playlist_info* playlist, int index, int new_index); | 167 | int playlist_move(struct playlist_info* playlist, int index, int new_index); |
164 | int playlist_randomise(struct playlist_info* playlist, unsigned int seed, | 168 | 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, | |||
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. */ |
962 | int talk_dir_or_spell(const char* dirname, | 963 | int 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 */ |
91 | int talk_file_or_spell(const char *dirname, const char* filename, | 91 | int 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 */ |
94 | int talk_dir_or_spell(const char* filename, | 95 | int talk_dir_or_spell(const char* filename, |
95 | const long *prefix_ids, bool enqueue); | 96 | const long *prefix_ids, bool enqueue); |
97 | #endif | ||
96 | int talk_number(long n, bool enqueue); /* say a number */ | 98 | int talk_number(long n, bool enqueue); /* say a number */ |
97 | int talk_value(long n, int unit, bool enqueue); /* say a numeric value */ | 99 | int talk_value(long n, int unit, bool enqueue); /* say a numeric value */ |
98 | int talk_value_decimal(long n, int unit, int decimals, bool enqueue); | 100 | int talk_value_decimal(long n, int unit, int decimals, bool enqueue); |