sig_tone.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <math.h>
#include <memory.h>
#include <string.h>
#include "spandsp/telephony.h"
#include "spandsp/dc_restore.h"
#include "spandsp/dds.h"
#include "spandsp/sig_tone.h"

Defines

#define PI   3.14159265358979323

Functions

int sig_tone_rx (sig_tone_state_t *s, int16_t amp[], int len)
 Process a block of received audio samples.
int sig_tone_tx (sig_tone_state_t *s, int16_t amp[], int len)
 Generate a block of signaling tone audio samples.
sig_tone_state_t * sig_tone_init (sig_tone_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data)
 Initialise a signaling tone context.

Variables

sig_tone_descriptor_t sig_tones [4]

Detailed Description


Function Documentation

sig_tone_state_t* sig_tone_init ( sig_tone_state_t *  s,
int  tone_type,
sig_tone_func_t  sig_update,
void *  user_data 
)

Initialise a signaling tone context.

Initialise a signaling tone context.

Parameters:
s The signaling tone context.
tone_type The type of signaling tone.
sig_update Callback function to handle signaling updates.
user_data An opaque pointer.
Returns:
A pointer to the signalling tone context, or NULL if there was a problem.

int sig_tone_rx ( sig_tone_state_t *  s,
int16_t  amp[],
int  len 
)

Process a block of received audio samples.

Process a block of received audio samples.

Parameters:
s The signaling tone context.
amp The audio sample buffer.
len The number of samples in the buffer.
Returns:
The number of samples unprocessed.

int sig_tone_tx ( sig_tone_state_t *  s,
int16_t  amp[],
int  len 
)

Generate a block of signaling tone audio samples.

Generate a block of signaling tone audio samples.

Parameters:
s The signaling tone context.
amp The audio sample buffer.
len The number of samples to be generated.
Returns:
The number of samples actually generated.


Generated on Fri Nov 10 09:40:24 2006 for libspandsp by  doxygen 1.5.1