#include <stdio.h>
#include <inttypes.h>
#include "floating_fudge.h"
#include "spandsp/telephony.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"
Defines | |
#define | SLENK 11 |
#define | SINELEN (1 << SLENK) |
Functions | |
int32_t | dds_phase_ratef (float frequency) |
Find the phase rate equivalent to a frequency, in Hz. | |
float | dds_frequencyf (int32_t phase_rate) |
Find the frequency, in Hz, equivalent to a phase rate. | |
float | dds_scaling_dbm0f (float level) |
Find the scaling factor equivalent to a dBm0 value. | |
float | dds_scaling_dbovf (float level) |
Find the scaling factor equivalent to a dBmov value. | |
void | dds_advancef (uint32_t *phase_acc, int32_t phase_rate) |
Advance the phase, without returning any new signal sample. | |
float | ddsf (uint32_t *phase_acc, int32_t phase_rate) |
Generate a floating point tone sample. | |
float | dds_lookupf (uint32_t phase) |
Lookup the floating point value of a specified phase. | |
float | dds_modf (uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase) |
Generate a floating point tone sample, with modulation. | |
complexf_t | dds_complexf (uint32_t *phase_acc, int32_t phase_rate) |
Generate a complex floating point tone sample. | |
complexf_t | dds_lookup_complexf (uint32_t phase) |
Lookup the complex value of a specified phase. | |
complexf_t | dds_complex_modf (uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase) |
Generate a complex floating point tone sample, with modulation. |
void dds_advancef | ( | uint32_t * | phase_acc, | |
int32_t | phase_rate | |||
) |
Advance the phase, without returning any new signal sample.
phase_acc | A pointer to a phase accumulator value. | |
phase_rate | The phase increment to be applied. |
Referenced by v17_rx(), v27ter_rx(), v29_rx(), and v32bis_rx().
complexf_t dds_complex_modf | ( | uint32_t * | phase_acc, | |
int32_t | phase_rate, | |||
float | scale, | |||
int32_t | phase | |||
) |
Generate a complex floating point tone sample, with modulation.
phase_acc | A pointer to a phase accumulator value. | |
phase_rate | The phase increment to be applied. | |
scale | The scaling factor. | |
phase | The phase offset. |
complexf_t dds_complexf | ( | uint32_t * | phase_acc, | |
int32_t | phase_rate | |||
) |
Generate a complex floating point tone sample.
phase_acc | A pointer to a phase accumulator value. | |
phase_rate | The phase increment to be applied. |
Referenced by v17_tx(), v22bis_rx(), v22bis_tx(), v27ter_tx(), and v32bis_tx().
float dds_frequencyf | ( | int32_t | phase_rate | ) |
Find the frequency, in Hz, equivalent to a phase rate.
phase_rate | The phase rate. |
Referenced by v17_rx_carrier_frequency(), v17_rx_restart(), v22bis_rx_carrier_frequency(), v27ter_rx_carrier_frequency(), v29_rx_carrier_frequency(), and v32bis_restart().
complexf_t dds_lookup_complexf | ( | uint32_t | phase_acc | ) |
Lookup the complex value of a specified phase.
phase | The phase accumulator value to be looked up. |
Referenced by v17_rx(), v27ter_rx(), v29_rx(), and v32bis_rx().
float dds_lookupf | ( | uint32_t | phase | ) |
Lookup the floating point value of a specified phase.
phase | The phase accumulator value to be looked up. |
float dds_modf | ( | uint32_t * | phase_acc, | |
int32_t | phase_rate, | |||
float | scale, | |||
int32_t | phase | |||
) |
Generate a floating point tone sample, with modulation.
phase_acc | A pointer to a phase accumulator value. | |
phase_rate | The phase increment to be applied. | |
scale | The scaling factor. | |
phase | The phase offset. |
Referenced by super_tone_tx(), and v22bis_tx().
int32_t dds_phase_ratef | ( | float | frequency | ) |
Find the phase rate equivalent to a frequency, in Hz.
frequency | The frequency, in Hz. |
Referenced by make_tone_gen_descriptor(), v17_rx_init(), v17_rx_restart(), v17_tx_init(), v22bis_init(), v22bis_rx_restart(), v27ter_rx_restart(), v27ter_tx_init(), v29_rx_restart(), v29_tx_init(), v32bis_init(), and v32bis_restart().
float dds_scaling_dbm0f | ( | float | level | ) |
Find the scaling factor equivalent to a dBm0 value.
level | The signal level in dBm0. |
Referenced by dtmf_tx_set_level(), and make_tone_gen_descriptor().
float dds_scaling_dbovf | ( | float | level | ) |
Find the scaling factor equivalent to a dBmov value.
level | The signal level in dBmov. |
float ddsf | ( | uint32_t * | phase_acc, | |
int32_t | phase_rate | |||
) |
Generate a floating point tone sample.
phase_acc | A pointer to a phase accumulator value. | |
phase_rate | The phase increment to be applied. |