37 template<
class o_type,
class i_type>
72 if(fabs(
phase) > M_PI) {
84 if(fabs(
phase) > M_PI){
98 void sincos(
float *sinx,
float *cosx)
const;
105 void sin(
float *output,
int noutput_items,
double ampl = 1.0);
106 void cos(
float *output,
int noutput_items,
double ampl = 1.0);
108 void sin(
short *output,
int noutput_items,
double ampl = 1.0);
109 void cos(
short *output,
int noutput_items,
double ampl = 1.0);
110 void sin(
int *output,
int noutput_items,
double ampl = 1.0);
111 void cos(
int *output,
int noutput_items,
double ampl = 1.0);
118 template<
class o_type,
class i_type>
125 template<
class o_type,
class i_type>
129 for(
int i = 0; i < noutput_items; i++) {
130 output[i] = (float)(
sin () * ampl);
135 template<
class o_type,
class i_type>
139 for(
int i = 0; i < noutput_items; i++) {
140 output[i] = (float)(
cos() * ampl);
145 template<
class o_type,
class i_type>
149 for(
int i = 0; i < noutput_items; i++) {
150 output[i] = (short)(
sin() * ampl);
155 template<
class o_type,
class i_type>
159 for(
int i = 0; i < noutput_items; i++) {
160 output[i] = (short)(
cos() * ampl);
165 template<
class o_type,
class i_type>
169 for(
int i = 0; i < noutput_items; i++) {
170 output[i] = (int)(
sin() * ampl);
175 template<
class o_type,
class i_type>
179 for(
int i = 0; i < noutput_items; i++) {
180 output[i] = (int)(
cos() * ampl);
185 template<
class o_type,
class i_type>
189 for(
int i = 0; i < noutput_items; i++) {
192 output[i] =
gr_complex(cosx * ampl, sinx * ampl);
float sin() const
Definition: nco.h:102
void adjust_phase(double delta_phase)
Definition: nco.h:51
void sincos(float *sinx, float *cosx) const
Definition: nco.h:120
void step(int n)
Definition: nco.h:81
void step()
Definition: nco.h:69
void adjust_freq(double delta_angle_rate)
Definition: nco.h:63
GR_RUNTIME_API void sincosf(float x, float *sin, float *cos)
nco()
Definition: nco.h:41
double phase
Definition: nco.h:114
std::complex< float > gr_complex
Definition: gr_complex.h:27
Include this header to use the message passing features.
Definition: logger.h:695
double get_freq() const
Definition: nco.h:95
double get_phase() const
Definition: nco.h:94
virtual ~nco()
Definition: nco.h:43
void set_freq(double angle_rate)
Definition: nco.h:57
void set_phase(double angle)
Definition: nco.h:46
base class template for Numerically Controlled Oscillator (NCO)
Definition: nco.h:38
float cos() const
Definition: nco.h:101
double phase_inc
Definition: nco.h:115