// ------------------------------------------------------------------ process -- void SPECTACLE2_BASE::process(const float *buf, const int) { DPRINT("SPECTACLE2_BASE::process\n"); const bool reading_input = (currentFrame() < _input_end_frame); if (reading_input) { DPRINT1("taking input...currentFrame()=%d\n", currentFrame()); prepare_input(buf); _fft->r2c(); cartesian_to_polar(); } modify_analysis(reading_input); polar_to_cartesian(); _fft->c2r(); prepare_output(); }
int main() { std::pair<double, double> polar = cartesian_to_polar(-1, -1); std::cout << "(1,1) cartesian is (" << polar.first << "," << polar.second<< ") polar\n"; }