spandsp 0.0.6
|
#include <stdio.h>
#include <inttypes.h>
#include "floating_fudge.h"
#include "spandsp/telephony.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"
Macros | |
#define | SLENK 11 |
#define | SINELEN (1 << SLENK) |
Functions | |
float | dds_phase_to_radians (uint32_t phase) |
Convert a 32 bit phase angle to an angle in radians, between 0 and 2*PI. More... | |
int32_t | dds_phase_ratef (float frequency) |
Find the phase rate equivalent to a frequency, in Hz. More... | |
float | dds_frequencyf (int32_t phase_rate) |
Find the frequency, in Hz, equivalent to a phase rate. More... | |
float | dds_scaling_dbm0f (float level) |
Find the scaling factor equivalent to a dBm0 value. More... | |
float | dds_scaling_dbovf (float level) |
Find the scaling factor equivalent to a dBmov value. More... | |
void | dds_advancef (uint32_t *phase_acc, int32_t phase_rate) |
Advance the phase, without returning any new signal sample. More... | |
float | ddsf (uint32_t *phase_acc, int32_t phase_rate) |
Generate a floating point tone sample. More... | |
float | dds_lookupf (uint32_t phase) |
Lookup the floating point value of a specified phase. More... | |
float | dds_modf (uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase) |
Generate a floating point tone sample, with modulation. More... | |
complexf_t | dds_complexf (uint32_t *phase_acc, int32_t phase_rate) |
Generate a complex floating point tone sample. More... | |
complexf_t | dds_lookup_complexf (uint32_t phase) |
Lookup the complex value of a specified phase. More... | |
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. More... | |
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. |
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. |
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(), v22bis_rx_carrier_frequency(), v27ter_rx_carrier_frequency(), and v29_rx_carrier_frequency().
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. |
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. |
int32_t dds_phase_ratef | ( | float | frequency | ) |
Find the phase rate equivalent to a frequency, in Hz.
frequency | The frequency, in Hz. |
float dds_phase_to_radians | ( | uint32_t | phase | ) |
Convert a 32 bit phase angle to an angle in radians, between 0 and 2*PI.
phase | The angle to convert. |
float dds_scaling_dbm0f | ( | float | level | ) |
Find the scaling factor equivalent to a dBm0 value.
level | The signal level in dBm0. |
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. |