complex_dds.c File Reference

#include <stdio.h>
#include <inttypes.h>
#include <math.h>
#include "spandsp/telephony.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"

Defines

#define M_PI   3.14159265358979323846
#define SLENK   11
#define SINELEN   (1 << SLENK)
#define TWO32   4.294967296e9

Functions

int32_t dds_phase_stepf (float frequency)
float dds_scaling_dbm0f (float level)
float dds_scaling_dbovf (float level)
float ddsf (uint32_t *phase_acc, int32_t phase_rate)
 Generate a floating point tone sample.
float dds_modf (uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
 Generate a floating point tone sample, with modulation.
complex_t dds_complexf (uint32_t *phase_acc, int32_t phase_rate)
 Generate a complex floating point tone sample.
complex_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.

Detailed Description


Function Documentation

complex_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.

Parameters:
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.
Returns:
The complex signal amplitude.

complex_t dds_complexf ( uint32_t *  phase_acc,
int32_t  phase_rate 
)

Generate a complex floating point tone sample.

Parameters:
phase_acc A pointer to a phase accumulator value.
phase_rate The phase increment to be applied.
Returns:
The complex signal amplitude, between -32767 and 32767.

float dds_modf ( uint32_t *  phase_acc,
int32_t  phase_rate,
float  scale,
int32_t  phase 
)

Generate a floating point tone sample, with modulation.

Parameters:
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.
Returns:
The signal amplitude.

float ddsf ( uint32_t *  phase_acc,
int32_t  phase_rate 
)

Generate a floating point tone sample.

Parameters:
phase_acc A pointer to a phase accumulator value.
phase_rate The phase increment to be applied.
Returns:
The signal amplitude, between -32767 and 32767.


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