summaryrefslogtreecommitdiff
path: root/apps/codecs/wav.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wav.c')
-rw-r--r--apps/codecs/wav.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c
index 293089a737..c2564231c1 100644
--- a/apps/codecs/wav.c
+++ b/apps/codecs/wav.c
@@ -21,7 +21,6 @@
21 ****************************************************************************/ 21 ****************************************************************************/
22 22
23#include "codeclib.h" 23#include "codeclib.h"
24#include "inttypes.h"
25#include "codecs/libpcm/support_formats.h" 24#include "codecs/libpcm/support_formats.h"
26 25
27CODEC_HEADER 26CODEC_HEADER
@@ -38,7 +37,9 @@ CODEC_HEADER
38 * 37 *
39 */ 38 */
40 39
41static int32_t samples[PCM_CHUNK_SIZE] IBSS_ATTR; 40#define PCM_SAMPLE_SIZE (4096*2)
41
42static int32_t samples[PCM_SAMPLE_SIZE] IBSS_ATTR;
42 43
43/* This codec support WAVE files with the following formats: */ 44/* This codec support WAVE files with the following formats: */
44enum 45enum
@@ -350,8 +351,8 @@ next_track:
350 351
351 /* check chunksize */ 352 /* check chunksize */
352 if ((format.chunksize / format.blockalign) * format.samplesperblock * format.channels 353 if ((format.chunksize / format.blockalign) * format.samplesperblock * format.channels
353 > PCM_CHUNK_SIZE) 354 > PCM_SAMPLE_SIZE)
354 format.chunksize = (PCM_CHUNK_SIZE / format.blockalign) * format.blockalign; 355 format.chunksize = (PCM_SAMPLE_SIZE / format.blockalign) * format.blockalign;
355 if (format.chunksize == 0) 356 if (format.chunksize == 0)
356 { 357 {
357 DEBUGF("CODEC_ERROR: chunksize is 0\n"); 358 DEBUGF("CODEC_ERROR: chunksize is 0\n");