diff options
Diffstat (limited to 'apps/codecs/libpcm/qt_ima_adpcm.c')
-rw-r--r-- | apps/codecs/libpcm/qt_ima_adpcm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/codecs/libpcm/qt_ima_adpcm.c b/apps/codecs/libpcm/qt_ima_adpcm.c index 003de22dd8..d7b3360eb3 100644 --- a/apps/codecs/libpcm/qt_ima_adpcm.c +++ b/apps/codecs/libpcm/qt_ima_adpcm.c | |||
@@ -57,12 +57,14 @@ static bool set_format(struct pcm_format *format) | |||
57 | return true; | 57 | return true; |
58 | } | 58 | } |
59 | 59 | ||
60 | static struct pcm_pos *get_seek_pos(long seek_time, | 60 | static struct pcm_pos *get_seek_pos(uint32_t seek_val, int seek_mode, |
61 | uint8_t *(*read_buffer)(size_t *realsize)) | 61 | uint8_t *(*read_buffer)(size_t *realsize)) |
62 | { | 62 | { |
63 | static struct pcm_pos newpos; | 63 | static struct pcm_pos newpos; |
64 | uint32_t newblock = ((uint64_t)seek_time * ci->id3->frequency) | 64 | uint32_t newblock = (seek_mode == PCM_SEEK_TIME) ? |
65 | / (1000LL * fmt->samplesperblock); | 65 | ((uint64_t)seek_val * ci->id3->frequency / 1000LL) |
66 | / fmt->samplesperblock : | ||
67 | seek_val / fmt->blockalign; | ||
66 | 68 | ||
67 | (void)read_buffer; | 69 | (void)read_buffer; |
68 | newpos.pos = newblock * fmt->blockalign; | 70 | newpos.pos = newblock * fmt->blockalign; |