mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
24 lines
671 B
C++
24 lines
671 B
C++
#include "complex_to_mag.h"
|
|
|
|
namespace satdump
|
|
{
|
|
namespace ndsp
|
|
{
|
|
ComplexToMagBlock::ComplexToMagBlock()
|
|
: BlockSimple<complex_t, float>( //
|
|
"complex_to_mag_cf", //
|
|
{{"in", DSP_SAMPLE_TYPE_CF32}}, //
|
|
{{"out", DSP_SAMPLE_TYPE_F32}})
|
|
{
|
|
}
|
|
|
|
ComplexToMagBlock::~ComplexToMagBlock() {}
|
|
|
|
uint32_t ComplexToMagBlock::process(complex_t *input, uint32_t nsamples, float *output)
|
|
{
|
|
volk_32fc_magnitude_32f(output, (lv_32fc_t *)input, nsamples);
|
|
|
|
return nsamples;
|
|
}
|
|
} // namespace ndsp
|
|
} // namespace satdump
|