This is exactly what we don't want to do!
On 16 December 2011 07:58, <mai...@svn.rockbox.org> wrote:
> Date: 2011-12-15 21:58:14 +0100 (Thu, 15 Dec 2011)
> New Revision: 31296
>
> Log Message:
> Add conditionals for functions only needed on SWCODEC targets.
>
> Modified:
> trunk/apps/metadata/id3tags.c
> trunk/apps/metadata/metadata_parsers.h
> trunk/apps/playlist.c
> trunk/apps/playlist.h
> trunk/apps/talk.c
> trunk/apps/talk.h
>
> Modified: trunk/apps/metadata/id3tags.c
> ===================================================================
> --- trunk/apps/metadata/id3tags.c 2011-12-15 20:48:15 UTC (rev 31295)
> +++ trunk/apps/metadata/id3tags.c 2011-12-15 20:58:14 UTC (rev 31296)
> @@ -92,6 +92,9 @@
> "Synthpop"
> };
>
> +#if CONFIG_CODEC != SWCODEC
> +static
> +#endif
> char* id3_get_num_genre(unsigned int genre_num)
> {
> if (genre_num < ARRAYLEN(genres))
>
> Modified: trunk/apps/metadata/metadata_parsers.h
> ===================================================================
> --- trunk/apps/metadata/metadata_parsers.h 2011-12-15 20:48:15 UTC (rev
> 31295)
> +++ trunk/apps/metadata/metadata_parsers.h 2011-12-15 20:58:14 UTC (rev
> 31296)
> @@ -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_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 */
>
> Modified: trunk/apps/playlist.c
> ===================================================================
> --- trunk/apps/playlist.c 2011-12-15 20:48:15 UTC (rev 31295)
> +++ trunk/apps/playlist.c 2011-12-15 20:58:14 UTC (rev 31296)
> @@ -1068,6 +1068,7 @@
> 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 @@
>
> 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 @@
> return index;
> }
>
> +#if CONFIG_CODEC == SWCODEC
> /* try playing next or previous folder */
> bool playlist_next_dir(int direction)
> {
> @@ -2647,6 +2650,7 @@
>
> 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. */
>
> Modified: trunk/apps/playlist.h
> ===================================================================
> --- trunk/apps/playlist.h 2011-12-15 20:48:15 UTC (rev 31295)
> +++ trunk/apps/playlist.h 2011-12-15 20:58:14 UTC (rev 31296)
> @@ -134,7 +134,9 @@
> 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 @@
> 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,
>
> Modified: trunk/apps/talk.c
> ===================================================================
> --- trunk/apps/talk.c 2011-12-15 20:48:15 UTC (rev 31295)
> +++ trunk/apps/talk.c 2011-12-15 20:58:14 UTC (rev 31296)
> @@ -957,6 +957,7 @@
> 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 @@
> 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) */
>
> Modified: trunk/apps/talk.h
> ===================================================================
> --- trunk/apps/talk.h 2011-12-15 20:48:15 UTC (rev 31295)
> +++ trunk/apps/talk.h 2011-12-15 20:58:14 UTC (rev 31296)
> @@ -90,9 +90,11 @@
> /* 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);
>
> _______________________________________________
> rockbox-cvs mailing list
> rockbox-...@cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs