summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-03-16 05:38:37 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-03-16 05:38:37 +0000
commit56dd75d204f861785ca78ae1c6eb506d5f2ea7e9 (patch)
tree19809cf7976dd47513171bac706a061ef130b2b2 /apps/codecs
parentdce799641d2f75feda39b087f03a1f64620f3d6b (diff)
downloadrockbox-56dd75d204f861785ca78ae1c6eb506d5f2ea7e9.zip
rockbox-56dd75d204f861785ca78ae1c6eb506d5f2ea7e9.tar.gz
rockbox-56dd75d204f861785ca78ae1c6eb506d5f2ea7e9.tar.bz2
rockbox-56dd75d204f861785ca78ae1c6eb506d5f2ea7e9.tar.xz
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
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/mpa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c
index 4d6c52f..4b49775 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) {