5#define WAVE_FORMAT_IMA_ADPCM 0x0011
6#define TAG(a, b, c, d) ((static_cast<uint32_t>(a) << 24) | (static_cast<uint32_t>(b) << 16) | (static_cast<uint32_t>(c) << 8) | (d))
7#define READ_BUFFER_SIZE 512
12 -1, -1, -1, -1, 2, 4, 6, 8,
13 -1, -1, -1, -1, 2, 4, 6, 8
17 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
18 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
19 50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
20 130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
21 337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
22 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
23 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
24 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
25 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
100 if (tag ==
TAG(
'R',
'I',
'F',
'F')) {
106 else if (tag ==
TAG(
'f',
'm',
't',
' ')) {
128 }
else if (tag ==
TAG(
'f',
'a',
'c',
't')) {
133 }
else if (tag ==
TAG(
'd',
'a',
't',
'a')) {
140 if (tag !=
TAG(
'R',
'I',
'F',
'F') && length > 20)
skip_len = length - 20;
368 LOGE(
"File is not valid");
398 bi.bits_per_sample = 16;
402 LOGI(
"WavIMADecoder writing first sound data");
417 return write(buffer, len);
443 if (step_index < 0) step_index = 0;
444 else if (step_index > 88) step_index = 88;
454 else predictor +=
diff;
455 if (predictor < -32768) predictor = -32768;
456 else if (predictor > 32767) predictor = 32767;
462 if (channels == 0 || channels > 2)
return;
481 if ((i & 15) == 7) output_pos -= 15;
482 else if ((i & 15) == 15) output_pos--;
489 for (
int i=0; i<max_size; i++) {
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define READ_BUFFER_SIZE
Definition CodecWAV.h:8
#define TAG(a, b, c, d)
Definition CodecWavIMA.h:6
#define WAVE_FORMAT_IMA_ADPCM
Definition CodecWavIMA.h:5