diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2008-04-29 19:00:42 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2008-04-29 19:00:42 +0000 |
commit | bce419d89062e842b65353f942cb6624d861a2aa (patch) | |
tree | 62756958b3acaf499745b777cdf99f6bcc7a8035 /apps/codecs | |
parent | 0e73b8a0a9d8a08d6078588a3402449d67219d8f (diff) | |
download | rockbox-bce419d89062e842b65353f942cb6624d861a2aa.tar.gz rockbox-bce419d89062e842b65353f942cb6624d861a2aa.zip |
Fix skipping back to the start of WMA files, broken by the addition of resume support. Not the most elegant fix perhaps, but it works for me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17291 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/wma.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c index 17d35bee52..6690db7dba 100644 --- a/apps/codecs/wma.c +++ b/apps/codecs/wma.c | |||
@@ -481,7 +481,7 @@ next_track: | |||
481 | /* Remember the resume position - when the codec is opened, the | 481 | /* Remember the resume position - when the codec is opened, the |
482 | playback engine will reset it. */ | 482 | playback engine will reset it. */ |
483 | resume_offset = ci->id3->offset; | 483 | resume_offset = ci->id3->offset; |
484 | 484 | restart_track: | |
485 | if (codec_init()) { | 485 | if (codec_init()) { |
486 | LOGF("WMA: Error initialising codec\n"); | 486 | LOGF("WMA: Error initialising codec\n"); |
487 | retval = CODEC_ERROR; | 487 | retval = CODEC_ERROR; |
@@ -516,6 +516,7 @@ next_track: | |||
516 | elapsedtime = 0; | 516 | elapsedtime = 0; |
517 | } | 517 | } |
518 | 518 | ||
519 | resume_offset = 0; | ||
519 | ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); | 520 | ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); |
520 | ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? | 521 | ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? |
521 | STEREO_MONO : STEREO_INTERLEAVED); | 522 | STEREO_MONO : STEREO_INTERLEAVED); |
@@ -536,7 +537,7 @@ next_track: | |||
536 | 537 | ||
537 | if (ci->seek_time == 1) { | 538 | if (ci->seek_time == 1) { |
538 | ci->seek_complete(); | 539 | ci->seek_complete(); |
539 | goto next_track; /* Pretend you never saw this... */ | 540 | goto restart_track; /* Pretend you never saw this... */ |
540 | } | 541 | } |
541 | 542 | ||
542 | elapsedtime = seek(ci->seek_time, &wfx); | 543 | elapsedtime = seek(ci->seek_time, &wfx); |