Blame bat/bat-signal.h

Packit Service a9274b
/*
Packit Service a9274b
 * Copyright (C) 2015 Caleb Crome
Packit Service a9274b
 * Copyright (C) 2013-2015 Intel Corporation
Packit Service a9274b
 *
Packit Service a9274b
 * This program is free software; you can redistribute it and/or modify
Packit Service a9274b
 * it under the terms of the GNU General Public License as published by
Packit Service a9274b
 * the Free Software Foundation; either version 2 of the License, or
Packit Service a9274b
 * (at your option) any later version.
Packit Service a9274b
 *
Packit Service a9274b
 * This program is distributed in the hope that it will be useful,
Packit Service a9274b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a9274b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a9274b
 * GNU General Public License for more details.
Packit Service a9274b
 *
Packit Service a9274b
 */
Packit Service a9274b
Packit Service a9274b
/*
Packit Service a9274b
 * Here's a generic sine wave generator that will work indefinitely
Packit Service a9274b
 * for any frequency.
Packit Service a9274b
 *
Packit Service a9274b
 * Note:  the state & phasor are stored as doubles (and updated as
Packit Service a9274b
 * doubles) because after a million samples the magnitude drifts a
Packit Service a9274b
 * bit.  If we really need floats, it can be done with periodic
Packit Service a9274b
 * renormalization of the state_real+state_imag magnitudes.
Packit Service a9274b
 */
Packit Service a9274b
Packit Service a9274b
int sin_generator_init(struct sin_generator *, float, float, float);
Packit Service a9274b
float sin_generator_next_sample(struct sin_generator *);
Packit Service a9274b
void sin_generator_vfill(struct sin_generator *, float *, int);
Packit Service a9274b
int generate_sine_wave(struct bat *, int, void *);
Packit Service a9274b
int generate_sine_wave_raw_mono(struct bat *, float *, float, int);