diff options
author | Sean Bartell <wingedtachikoma@gmail.com> | 2011-08-12 01:27:13 -0400 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-04-28 09:07:40 +0200 |
commit | fe3d58004cf28fb98dd29159187d256aaf5d0781 (patch) | |
tree | 0bab6252f0f282675878c15183c5c660b52dc233 /lib/rbcodec/metadata | |
parent | b794cbbdca28989ca357cec44e4d2df5e9fb67bd (diff) | |
download | rockbox-fe3d58004cf28fb98dd29159187d256aaf5d0781.tar.gz rockbox-fe3d58004cf28fb98dd29159187d256aaf5d0781.zip |
rbcodec refactoring: get_audio_base_data_type
This function has been changed to rbcodec_format_is_atomic, which
doesn't require an enum from the kernel.
Change-Id: I1d537605087fe130a9b545509d7b8a340806dbf2
Reviewed-on: http://gerrit.rockbox.org/141
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
Diffstat (limited to 'lib/rbcodec/metadata')
-rw-r--r-- | lib/rbcodec/metadata/metadata.c | 12 | ||||
-rw-r--r-- | lib/rbcodec/metadata/metadata.h | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/rbcodec/metadata/metadata.c b/lib/rbcodec/metadata/metadata.c index b91e00cc4e..6837e97316 100644 --- a/lib/rbcodec/metadata/metadata.c +++ b/lib/rbcodec/metadata/metadata.c | |||
@@ -307,10 +307,10 @@ int get_audio_base_codec_type(int type) | |||
307 | } | 307 | } |
308 | 308 | ||
309 | /* Get the basic audio type */ | 309 | /* Get the basic audio type */ |
310 | enum data_type get_audio_base_data_type(int afmt) | 310 | bool rbcodec_format_is_atomic(int afmt) |
311 | { | 311 | { |
312 | if ((unsigned)afmt >= AFMT_NUM_CODECS) | 312 | if ((unsigned)afmt >= AFMT_NUM_CODECS) |
313 | return TYPE_UNKNOWN; | 313 | return false; |
314 | 314 | ||
315 | switch (get_audio_base_codec_type(afmt)) | 315 | switch (get_audio_base_codec_type(afmt)) |
316 | { | 316 | { |
@@ -327,15 +327,11 @@ enum data_type get_audio_base_data_type(int afmt) | |||
327 | case AFMT_KSS: | 327 | case AFMT_KSS: |
328 | /* Type must be allocated and loaded in its entirety onto | 328 | /* Type must be allocated and loaded in its entirety onto |
329 | the buffer */ | 329 | the buffer */ |
330 | return TYPE_ATOMIC_AUDIO; | 330 | return true; |
331 | 331 | ||
332 | default: | 332 | default: |
333 | /* Assume type may be loaded and discarded incrementally */ | 333 | /* Assume type may be loaded and discarded incrementally */ |
334 | return TYPE_PACKET_AUDIO; | 334 | return false; |
335 | |||
336 | case AFMT_UNKNOWN: | ||
337 | /* Have no idea at all */ | ||
338 | return TYPE_UNKNOWN; | ||
339 | } | 335 | } |
340 | } | 336 | } |
341 | 337 | ||
diff --git a/lib/rbcodec/metadata/metadata.h b/lib/rbcodec/metadata/metadata.h index 55e4d76f25..5a1c17bc11 100644 --- a/lib/rbcodec/metadata/metadata.h +++ b/lib/rbcodec/metadata/metadata.h | |||
@@ -340,7 +340,7 @@ void wipe_mp3entry(struct mp3entry *id3); | |||
340 | void fill_metadata_from_path(struct mp3entry *id3, const char *trackname); | 340 | void fill_metadata_from_path(struct mp3entry *id3, const char *trackname); |
341 | int get_audio_base_codec_type(int type); | 341 | int get_audio_base_codec_type(int type); |
342 | void strip_tags(int handle_id); | 342 | void strip_tags(int handle_id); |
343 | enum data_type get_audio_base_data_type(int afmt); | 343 | bool rbcodec_format_is_atomic(int afmt); |
344 | bool format_buffers_with_offset(int afmt); | 344 | bool format_buffers_with_offset(int afmt); |
345 | #endif | 345 | #endif |
346 | 346 | ||