X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Flib%2Fgeneral%2Fgr_complex_to_xxx.cc;h=abffa4da13324a4b6dea4b62cfd3dfe5b3e5f2d3;hb=ea29b08aeb54227e6628f655ccfdb96fe4d8c378;hp=d519b3a7e70113265da0627110f5a810632a5f4f;hpb=09a1e803a9e6587c78d20cdf16891e5295874668;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc b/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc index d519b3a7..abffa4da 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc +++ b/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004,2008 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -26,6 +26,7 @@ #include #include +#include // ---------------------------------------------------------------- @@ -50,7 +51,7 @@ gr_complex_to_float::work (int noutput_items, { const gr_complex *in = (const gr_complex *) input_items[0]; float *out0 = (float *) output_items[0]; - float *out1 = (float *) output_items[1]; + float* out1; int noi = noutput_items * d_vlen; switch (output_items.size ()){ @@ -61,6 +62,7 @@ gr_complex_to_float::work (int noutput_items, break; case 2: + out1 = (float *) output_items[1]; for (int i = 0; i < noi; i++){ out0[i] = in[i].real (); out1[i] = in[i].imag (); @@ -226,7 +228,8 @@ gr_complex_to_arg::work (int noutput_items, int noi = noutput_items * d_vlen; for (int i = 0; i < noi; i++){ - out[i] = std::arg (in[i]); + // out[i] = std::arg (in[i]); + out[i] = gr_fast_atan2f(in[i]); } return noutput_items; }