summaryrefslogtreecommitdiffstats
path: root/apps/playback.c
diff options
context:
space:
mode:
authorSean Bartell <wingedtachikoma@gmail.com>2011-08-12 01:27:13 -0400
committerNils Wallménius <nils@rockbox.org>2012-04-28 09:07:40 +0200
commitfe3d58004cf28fb98dd29159187d256aaf5d0781 (patch)
tree0bab6252f0f282675878c15183c5c660b52dc233 /apps/playback.c
parentb794cbbdca28989ca357cec44e4d2df5e9fb67bd (diff)
downloadrockbox-fe3d58004cf28fb98dd29159187d256aaf5d0781.tar.gz
rockbox-fe3d58004cf28fb98dd29159187d256aaf5d0781.tar.bz2
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 'apps/playback.c')
-rw-r--r--apps/playback.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 100558177e..944775d6e1 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -972,7 +972,7 @@ static void audio_update_filebuf_watermark(int seconds)
if (id3)
{
- if (get_audio_base_data_type(id3->codectype) == TYPE_PACKET_AUDIO)
+ if (!rbcodec_format_is_atomic(id3->codectype))
{
bytes = id3->bitrate * (1000/8) * seconds;
}
@@ -1897,7 +1897,8 @@ static int audio_finish_load_track(struct track_info *info)
calls it again, so we don't save it (and they shouldn't accumulate) */
size_t offset = resume_rewind_adjusted_offset(track_id3);
- enum data_type audiotype = get_audio_base_data_type(track_id3->codectype);
+ enum data_type audiotype = rbcodec_format_is_atomic(track_id3->codectype) ?
+ TYPE_ATOMIC_AUDIO : TYPE_PACKET_AUDIO;
if (audiotype == TYPE_ATOMIC_AUDIO)
logf("Loading atomic %d", track_id3->codectype);
@@ -2342,9 +2343,7 @@ static void audio_on_codec_complete(int status)
struct mp3entry *track_id3 = bufgetid3(info->id3_hid);
- if (track_id3 &&
- get_audio_base_data_type(track_id3->codectype)
- == TYPE_PACKET_AUDIO)
+ if (track_id3 && !rbcodec_format_is_atomic(track_id3->codectype))
{
/* Continue filling after this track */
audio_reset_and_rebuffer(TRACK_LIST_KEEP_CURRENT, 1);