diff options
Diffstat (limited to 'gnuradio-runtime/include/gnuradio/fxpt_vco.h')
-rw-r--r-- | gnuradio-runtime/include/gnuradio/fxpt_vco.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnuradio-runtime/include/gnuradio/fxpt_vco.h b/gnuradio-runtime/include/gnuradio/fxpt_vco.h index 77d58677ce..cbc204c1b8 100644 --- a/gnuradio-runtime/include/gnuradio/fxpt_vco.h +++ b/gnuradio-runtime/include/gnuradio/fxpt_vco.h @@ -61,6 +61,17 @@ namespace gr { *cosx = fxpt::cos(d_phase); } + // compute complex sine a block at a time + void sincos(gr_complex *output, const float *input, int noutput_items, + float k, float ampl = 1.0) + { + for(int i = 0; i < noutput_items; i++) { + output[i] = gr_complex((float)(fxpt::cos(d_phase) * ampl), + (float)(fxpt::sin(d_phase) * ampl)); + adjust_phase(input[i] * k); + } + } + // compute a block at a time void cos(float *output, const float *input, int noutput_items, float k, float ampl = 1.0) { |