** **
\*****************************************************************************/
-signed long *audio_law_to_s32;
+signed int *audio_law_to_s32;
+unsigned char silence;
/* ulaw -> signed 16-bit */
-static signed long audio_ulaw_to_s32[] =
+static signed int audio_ulaw_to_s32[] =
{
0xffff8284, 0xffff8684, 0xffff8a84, 0xffff8e84,
0xffff9284, 0xffff9684, 0xffff9a84, 0xffff9e84,
};
/* alaw -> signed 16-bit */
-static signed long audio_alaw_to_s32[] =
+static signed int audio_alaw_to_s32[] =
{
0x000013fc, 0xffffec04, 0x00000144, 0xfffffebc,
0x0000517c, 0xffffae84, 0x0000051c, 0xfffffae4,
{
int i, j;
- if (law == 'a')
- {
+ if (law == 'a') {
+ silence = 0x2a;
audio_law_to_s32=audio_alaw_to_s32;
/* generating alaw-table */
i = j = 0;
= audio_alaw_relations[(j<<1)|1];
i++;
}
- } else
- {
+ } else {
+ silence = 0xff;
audio_law_to_s32=audio_ulaw_to_s32;
/* generating ulaw-table */
i = j = 0;