Files
2026-07-14 00:26:01 +02:00

37 lines
494 B
C

//
// Created by bruno on 13. 7. 2026.
//
#ifndef AUDIOCODER_GOERTZEL_H
#define AUDIOCODER_GOERTZEL_H
typedef struct {
float coeff;
float s1;
float s2;
} Goertzel;
void goertzel_init(
Goertzel *g,
float freq,
float sampleRate,
int samples);
void goertzel_add(
Goertzel *g,
float sample);
float goertzel_energy(
Goertzel *g);
int goertzel_bin_freq(
int freq,
int sampleRate,
int samples);
#endif //AUDIOCODER_GOERTZEL_H