From bce419d89062e842b65353f942cb6624d861a2aa Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Tue, 29 Apr 2008 19:00:42 +0000 Subject: 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 --- apps/codecs/wma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps') 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: /* Remember the resume position - when the codec is opened, the playback engine will reset it. */ resume_offset = ci->id3->offset; - +restart_track: if (codec_init()) { LOGF("WMA: Error initialising codec\n"); retval = CODEC_ERROR; @@ -516,6 +516,7 @@ next_track: elapsedtime = 0; } + resume_offset = 0; ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? STEREO_MONO : STEREO_INTERLEAVED); @@ -536,7 +537,7 @@ next_track: if (ci->seek_time == 1) { ci->seek_complete(); - goto next_track; /* Pretend you never saw this... */ + goto restart_track; /* Pretend you never saw this... */ } elapsedtime = seek(ci->seek_time, &wfx); -- cgit v1.2.3