Go to the source code of this file.
|  | 
| enum | { G726_ENCODING_LINEAR = 0
, G726_ENCODING_ULAW
, G726_ENCODING_ALAW
 } | 
|  | 
| enum | { G726_PACKING_NONE = 0
, G726_PACKING_LEFT = 1
, G726_PACKING_RIGHT = 2
 } | 
|  | 
◆ g726_state_t
◆ g726_decode()
      
        
          | int g726_decode | ( | g726_state_t * | s, | 
        
          |  |  | int16_t | amp[], | 
        
          |  |  | const uint8_t | g726_data[], | 
        
          |  |  | int | g726_bytes | 
        
          |  | ) |  |  | 
      
 
 
◆ g726_encode()
      
        
          | int g726_encode | ( | g726_state_t * | s, | 
        
          |  |  | uint8_t | g726_data[], | 
        
          |  |  | const int16_t | amp[], | 
        
          |  |  | int | len | 
        
          |  | ) |  |  | 
      
 
 
◆ g726_free()
Free a G.726 encode or decode context. 
- Parameters
- 
  
  
- Returns
- 0 for OK. 
 
 
◆ g726_init()
Initialise a G.726 encode or decode context. 
- Parameters
- 
  
    | s | The G.726 context. |  | bit_rate | The required bit rate for the ADPCM data. The valid rates are 16000, 24000, 32000 and 40000. |  | ext_coding | The coding used outside G.726. |  | packing | One of the G.726_PACKING_xxx options. |  
 
- Returns
- A pointer to the G.726 context, or NULL for error. 
References g726_state_s::a, g726_state_s::ap, g726_state_s::b, g726_state_s::bits_per_sample, bitstream_init(), g726_state_s::bs, g726_state_s::dec_func, g726_state_s::dml, g726_state_s::dms, g726_state_s::dq, g726_state_s::enc_func, g726_state_s::ext_coding, g726_state_s::packing, g726_state_s::pk, g726_state_s::rate, g726_state_s::sr, g726_state_s::td, g726_state_s::yl, and g726_state_s::yu.
 
 
◆ g726_release()
Release a G.726 encode or decode context. 
- Parameters
- 
  
  
- Returns
- 0 for OK.