UniMRCP  1.7.0
Macros | Functions
g711.h File Reference

A-law and u-law conversion routines. More...

#include "mpf.h"
Include dependency graph for g711.h:

Go to the source code of this file.

Macros

#define ULAW_BIAS   0x84 /* Bias for linear code. */
 
#define ALAW_AMI_MASK   0x55
 

Functions

apr_byte_t alaw_to_ulaw (apr_byte_t alaw)
 Transcode from A-law to u-law, using the procedure defined in G.711. More...
 
apr_byte_t ulaw_to_alaw (apr_byte_t ulaw)
 Transcode from u-law to A-law, using the procedure defined in G.711. More...
 

Detailed Description

A-law and u-law conversion routines.

Function Documentation

◆ alaw_to_ulaw()

apr_byte_t alaw_to_ulaw ( apr_byte_t  alaw)

Transcode from A-law to u-law, using the procedure defined in G.711.

Parameters
alawThe A-law sample to transcode.
Returns
The best matching u-law value.

◆ ulaw_to_alaw()

apr_byte_t ulaw_to_alaw ( apr_byte_t  ulaw)

Transcode from u-law to A-law, using the procedure defined in G.711.

Parameters
alawThe u-law sample to transcode.
Returns
The best matching A-law value.