diff options
Diffstat (limited to 'apps/codecs/libpcm/swf_adpcm.c')
-rw-r--r-- | apps/codecs/libpcm/swf_adpcm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/codecs/libpcm/swf_adpcm.c b/apps/codecs/libpcm/swf_adpcm.c index 9acab5cb4b..3441c667d4 100644 --- a/apps/codecs/libpcm/swf_adpcm.c +++ b/apps/codecs/libpcm/swf_adpcm.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "codeclib.h" | 21 | #include "codeclib.h" |
22 | #include "pcm_common.h" | ||
23 | #include "ima_adpcm_common.h" | 22 | #include "ima_adpcm_common.h" |
24 | #include "support_formats.h" | 23 | #include "support_formats.h" |
25 | 24 | ||
@@ -193,18 +192,20 @@ static int decode(const uint8_t *inbuf, size_t inbufsize, | |||
193 | init_pcmdata[1] -= 65536; | 192 | init_pcmdata[1] -= 65536; |
194 | } | 193 | } |
195 | 194 | ||
196 | *outbuf++ = init_pcmdata[0] << 13; | 195 | *outbuf++ = init_pcmdata[0] << IMA_ADPCM_INC_DEPTH; |
197 | if (ch > 0) | 196 | if (ch > 0) |
198 | *outbuf++ = init_pcmdata[1] << 13; | 197 | *outbuf++ = init_pcmdata[1] << IMA_ADPCM_INC_DEPTH; |
199 | 198 | ||
200 | set_decode_parameters(fmt->channels, init_pcmdata, init_index); | 199 | set_decode_parameters(fmt->channels, init_pcmdata, init_index); |
201 | 200 | ||
202 | /* read block data */ | 201 | /* read block data */ |
203 | while (--count > 0) | 202 | while (--count > 0) |
204 | { | 203 | { |
205 | *outbuf++ = create_pcmdata(0, get_data(&inbuf, fmt->bitspersample)) << 13; | 204 | *outbuf++ = create_pcmdata(0, get_data(&inbuf, fmt->bitspersample)) |
205 | << IMA_ADPCM_INC_DEPTH; | ||
206 | if (ch > 0) | 206 | if (ch > 0) |
207 | *outbuf++ = create_pcmdata(ch, get_data(&inbuf, fmt->bitspersample)) << 13; | 207 | *outbuf++ = create_pcmdata(ch, get_data(&inbuf, fmt->bitspersample)) |
208 | << IMA_ADPCM_INC_DEPTH; | ||
208 | } | 209 | } |
209 | 210 | ||
210 | *outbufcount = fmt->samplesperblock; | 211 | *outbufcount = fmt->samplesperblock; |