From 56dd75d204f861785ca78ae1c6eb506d5f2ea7e9 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 16 Mar 2011 05:38:37 +0000 Subject: Purge buffer and codec APIs existing exclusively in support of mpa.codec and fix that to not require them: buf_get_offset and ci.advance_buffer_loc. Sort APIs; everything must become incompatible. :( git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29595 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/mpa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/codecs/mpa.c') diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 4d6c52f2b3..4b49775029 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -424,24 +424,22 @@ next_track: /* Fill the buffer */ if (stream.next_frame) - ci->advance_buffer_loc((void *)stream.next_frame); + ci->advance_buffer(stream.next_frame - stream.buffer); else ci->advance_buffer(size); - stream.error = 0; + stream.error = 0; /* Must get new inputbuffer next time */ file_end++; continue; } else if (MAD_RECOVERABLE(stream.error)) { + /* Probably syncing after a seek */ continue; } else { /* Some other unrecoverable error */ status = CODEC_ERROR; break; } - break; } - file_end = 0; - /* Do the pcmbuf insert here. Note, this is the PREVIOUS frame's pcm data (not the one just decoded above). When we exit the decoding loop we will need to process the final frame that was decoded. */ @@ -479,9 +477,11 @@ next_track: } if (stream.next_frame) - ci->advance_buffer_loc((void *)stream.next_frame); + ci->advance_buffer(stream.next_frame - stream.buffer); else ci->advance_buffer(size); + stream.error = 0; /* Must get new inputbuffer next time */ + file_end = 0; framelength = synth.pcm.length - samples_to_skip; if (framelength < 0) { -- cgit v1.2.3