diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 9 |
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) | |||
972 | 972 | ||
973 | if (id3) | 973 | if (id3) |
974 | { | 974 | { |
975 | if (get_audio_base_data_type(id3->codectype) == TYPE_PACKET_AUDIO) | 975 | if (!rbcodec_format_is_atomic(id3->codectype)) |
976 | { | 976 | { |
977 | bytes = id3->bitrate * (1000/8) * seconds; | 977 | bytes = id3->bitrate * (1000/8) * seconds; |
978 | } | 978 | } |
@@ -1897,7 +1897,8 @@ static int audio_finish_load_track(struct track_info *info) | |||
1897 | calls it again, so we don't save it (and they shouldn't accumulate) */ | 1897 | calls it again, so we don't save it (and they shouldn't accumulate) */ |
1898 | size_t offset = resume_rewind_adjusted_offset(track_id3); | 1898 | size_t offset = resume_rewind_adjusted_offset(track_id3); |
1899 | 1899 | ||
1900 | enum data_type audiotype = get_audio_base_data_type(track_id3->codectype); | 1900 | enum data_type audiotype = rbcodec_format_is_atomic(track_id3->codectype) ? |
1901 | TYPE_ATOMIC_AUDIO : TYPE_PACKET_AUDIO; | ||
1901 | 1902 | ||
1902 | if (audiotype == TYPE_ATOMIC_AUDIO) | 1903 | if (audiotype == TYPE_ATOMIC_AUDIO) |
1903 | logf("Loading atomic %d", track_id3->codectype); | 1904 | logf("Loading atomic %d", track_id3->codectype); |
@@ -2342,9 +2343,7 @@ static void audio_on_codec_complete(int status) | |||
2342 | 2343 | ||
2343 | struct mp3entry *track_id3 = bufgetid3(info->id3_hid); | 2344 | struct mp3entry *track_id3 = bufgetid3(info->id3_hid); |
2344 | 2345 | ||
2345 | if (track_id3 && | 2346 | if (track_id3 && !rbcodec_format_is_atomic(track_id3->codectype)) |
2346 | get_audio_base_data_type(track_id3->codectype) | ||
2347 | == TYPE_PACKET_AUDIO) | ||
2348 | { | 2347 | { |
2349 | /* Continue filling after this track */ | 2348 | /* Continue filling after this track */ |
2350 | audio_reset_and_rebuffer(TRACK_LIST_KEEP_CURRENT, 1); | 2349 | audio_reset_and_rebuffer(TRACK_LIST_KEEP_CURRENT, 1); |