From fe3d58004cf28fb98dd29159187d256aaf5d0781 Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Fri, 12 Aug 2011 01:27:13 -0400 Subject: rbcodec refactoring: get_audio_base_data_type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Nils Wallménius --- apps/playback.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'apps/playback.c') 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); -- cgit