summaryrefslogtreecommitdiffstats
path: root/apps/codecs/a52.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2006-07-26 19:08:16 +0000
committerMagnus Holmgren <magnushol@gmail.com>2006-07-26 19:08:16 +0000
commit0d8c50d7afbb0953f9d23705f327353c9d3c713b (patch)
treeff2ca73ac10b07595f3eb7025930f0ec4f2fe76a /apps/codecs/a52.c
parent40a3fd6938962a13b4f73c77b2058942c2a9c701 (diff)
downloadrockbox-0d8c50d7afbb0953f9d23705f327353c9d3c713b.tar.gz
rockbox-0d8c50d7afbb0953f9d23705f327353c9d3c713b.zip
Add resume support for AC3 files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10332 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/a52.c')
-rw-r--r--apps/codecs/a52.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c
index 71e0fda432..0c69c6a2c7 100644
--- a/apps/codecs/a52.c
+++ b/apps/codecs/a52.c
@@ -161,7 +161,17 @@ next_track:
state = a52_init(0);
/* The main decoding loop */
- samplesdone = 0;
+ if (ci->id3->offset) {
+ if (ci->seek_buffer(ci->id3->offset)) {
+ samplesdone = (ci->id3->offset / ci->id3->bytesperframe) *
+ A52_SAMPLESPERFRAME;
+ ci->set_elapsed(samplesdone/(ci->id3->frequency / 1000));
+ }
+ }
+ else {
+ samplesdone = 0;
+ }
+
while (1) {
if (ci->stop_codec || ci->new_track)
break;