spandsp 0.0.6
super_tone_tx.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <ctype.h>
#include <time.h>
#include <inttypes.h>
#include "floating_fudge.h"
#include "spandsp/telephony.h"
#include "spandsp/fast_convert.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"
#include "spandsp/tone_generate.h"
#include "spandsp/super_tone_tx.h"
#include "spandsp/private/tone_generate.h"
#include "spandsp/private/super_tone_tx.h"

Functions

super_tone_tx_step_tsuper_tone_tx_make_step (super_tone_tx_step_t *s, float f1, float l1, float f2, float l2, int length, int cycles)
int super_tone_tx_free_tone (super_tone_tx_step_t *s)
super_tone_tx_state_tsuper_tone_tx_init (super_tone_tx_state_t *s, super_tone_tx_step_t *tree)
 Initialise a supervisory tone generator.
int super_tone_tx_release (super_tone_tx_state_t *s)
int super_tone_tx_free (super_tone_tx_state_t *s)
int super_tone_tx (super_tone_tx_state_t *s, int16_t amp[], int max_samples)
 Generate a block of audio samples for a supervisory tone pattern.

Function Documentation

◆ super_tone_tx()

int super_tone_tx ( super_tone_tx_state_t * s,
int16_t amp[],
int max_samples )

Generate a block of audio samples for a supervisory tone pattern.

Generate a block of audio samples for a supervisory tone pattern.

Parameters
sThe supervisory tone context.
ampThe audio sample buffer.
max_samplesThe maximum number of samples to be generated.
Returns
The number of samples generated.

References dds_modf().

◆ super_tone_tx_init()

super_tone_tx_state_t * super_tone_tx_init ( super_tone_tx_state_t * s,
super_tone_tx_step_t * tree )

Initialise a supervisory tone generator.

Initialise a supervisory tone generator.

Parameters
sThe supervisory tone generator context.
treeThe supervisory tone tree to be generated.
Returns
The supervisory tone generator context.