diff options
author | Yoshihisa Uchida <uchida@rockbox.org> | 2010-03-22 10:02:05 +0000 |
---|---|---|
committer | Yoshihisa Uchida <uchida@rockbox.org> | 2010-03-22 10:02:05 +0000 |
commit | 7a3822c8b03a5438a1bcfd6e38c0e6860dda3348 (patch) | |
tree | e50740c7f0ccd6aff1aac0e292a000ac7ef6be14 /apps/codecs/libpcm/pcm_common.h | |
parent | 20fccd84897352478c3306e41ca0fab0a5f4c65e (diff) | |
download | rockbox-7a3822c8b03a5438a1bcfd6e38c0e6860dda3348.tar.gz rockbox-7a3822c8b03a5438a1bcfd6e38c0e6860dda3348.zip |
fix bug: WAV file playback does not resume (FS#11077)
Not only WAV but also Sun audio, SMAF, vox and WAV64 can resume.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25289 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libpcm/pcm_common.h')
-rw-r--r-- | apps/codecs/libpcm/pcm_common.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/codecs/libpcm/pcm_common.h b/apps/codecs/libpcm/pcm_common.h index 412ffbce0b..91c3ab7f1e 100644 --- a/apps/codecs/libpcm/pcm_common.h +++ b/apps/codecs/libpcm/pcm_common.h | |||
@@ -124,6 +124,9 @@ struct pcm_pos { | |||
124 | uint32_t samples; | 124 | uint32_t samples; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | #define PCM_SEEK_TIME 0 | ||
128 | #define PCM_SEEK_POS 1 | ||
129 | |||
127 | struct pcm_codec { | 130 | struct pcm_codec { |
128 | /* | 131 | /* |
129 | * sets the format speciffic RIFF/AIFF header information and checks the pcm_format. | 132 | * sets the format speciffic RIFF/AIFF header information and checks the pcm_format. |
@@ -140,8 +143,12 @@ struct pcm_codec { | |||
140 | /* | 143 | /* |
141 | * get seek position | 144 | * get seek position |
142 | * | 145 | * |
143 | * [In] seek_time | 146 | * [In] seek_val |
144 | * seek time [ms] | 147 | * seek time [ms] or seek position |
148 | * | ||
149 | * [In] seek_mode | ||
150 | * if seek_mode sets PCM_SEEK_TIME, then seek_val means the seek time. | ||
151 | * if seek_mode sets PCM_SEEK_POS, then seek_val means the seek position. | ||
145 | * | 152 | * |
146 | * [In] read_buffer | 153 | * [In] read_buffer |
147 | * the function which reads the data from the file (chunksize bytes read). | 154 | * the function which reads the data from the file (chunksize bytes read). |
@@ -149,7 +156,7 @@ struct pcm_codec { | |||
149 | * return | 156 | * return |
150 | * position after the seeking. | 157 | * position after the seeking. |
151 | */ | 158 | */ |
152 | struct pcm_pos *(*get_seek_pos)(long seek_time, | 159 | struct pcm_pos *(*get_seek_pos)(uint32_t seek_val, int seek_mode, |
153 | uint8_t *(*read_buffer)(size_t *realsize)); | 160 | uint8_t *(*read_buffer)(size_t *realsize)); |
154 | 161 | ||
155 | /* | 162 | /* |