|
|
|
|
|
|
|
|
*out++ = ulaw_decode_table[(tmp32 >> 16) & 255]; |
|
|
*out++ = ulaw_decode_table[(tmp32 >> 16) & 255]; |
|
|
*out++ = ulaw_decode_table[(tmp32 >> 24) & 255]; |
|
|
*out++ = ulaw_decode_table[(tmp32 >> 24) & 255]; |
|
|
} |
|
|
} |
|
|
consumed = 128; |
|
|
|
|
|
|
|
|
consumed = AUDIO_BLOCK_SAMPLES; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 0x81: // 16 bit PCM, 44100 Hz |
|
|
case 0x81: // 16 bit PCM, 44100 Hz |
|
|
|
|
|
|
|
|
*out++ = (int16_t)(tmp32 & 65535); |
|
|
*out++ = (int16_t)(tmp32 & 65535); |
|
|
*out++ = (int16_t)(tmp32 >> 16); |
|
|
*out++ = (int16_t)(tmp32 >> 16); |
|
|
} |
|
|
} |
|
|
consumed = 128; |
|
|
|
|
|
|
|
|
consumed = AUDIO_BLOCK_SAMPLES; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 0x02: // u-law encoded, 22050 Hz |
|
|
case 0x02: // u-law encoded, 22050 Hz |
|
|
|
|
|
|
|
|
*out++ = s4; |
|
|
*out++ = s4; |
|
|
s0 = s4; |
|
|
s0 = s4; |
|
|
} |
|
|
} |
|
|
consumed = 64; |
|
|
|
|
|
|
|
|
consumed = AUDIO_BLOCK_SAMPLES/2; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 0x82: // 16 bits PCM, 22050 Hz |
|
|
case 0x82: // 16 bits PCM, 22050 Hz |
|
|
|
|
|
|
|
|
*out++ = s2; |
|
|
*out++ = s2; |
|
|
s0 = s2; |
|
|
s0 = s2; |
|
|
} |
|
|
} |
|
|
consumed = 64; |
|
|
|
|
|
|
|
|
consumed = AUDIO_BLOCK_SAMPLES/2; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 0x03: // u-law encoded, 11025 Hz |
|
|
case 0x03: // u-law encoded, 11025 Hz |
|
|
|
|
|
|
|
|
*out++ = s4; |
|
|
*out++ = s4; |
|
|
s0 = s4; |
|
|
s0 = s4; |
|
|
} |
|
|
} |
|
|
consumed = 32; |
|
|
|
|
|
|
|
|
consumed = AUDIO_BLOCK_SAMPLES/4; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case 0x83: // 16 bit PCM, 11025 Hz |
|
|
case 0x83: // 16 bit PCM, 11025 Hz |
|
|
|
|
|
|
|
|
*out++ = s2; |
|
|
*out++ = s2; |
|
|
s0 = s2; |
|
|
s0 = s2; |
|
|
} |
|
|
} |
|
|
consumed = 32; |
|
|
|
|
|
|
|
|
consumed = AUDIO_BLOCK_SAMPLES/4; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
default: |
|
|
default: |