Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
src
olaf_ep_extractor.h
Go to the documentation of this file.
1
// Olaf: Overly Lightweight Acoustic Fingerprinting
2
// Copyright (C) 2019-2025 Joren Six
3
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU Affero General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU Affero General Public License for more details.
13
14
// You should have received a copy of the GNU Affero General Public License
15
// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
25
26
#ifndef OLAF_EP_EXTRACTOR_H
27
#define OLAF_EP_EXTRACTOR_H
28
29
#include "
olaf_config.h
"
30
35
struct
eventpoint
{
36
int
frequencyBin
;
37
int
timeIndex
;
38
float
magnitude
;
39
int
usages
;
40
};
41
42
47
struct
extracted_event_points
{
48
struct
eventpoint
*
eventPoints
;
49
int
eventPointIndex
;
50
};
51
62
typedef
struct
Olaf_EP_Extractor
Olaf_EP_Extractor
;
63
69
Olaf_EP_Extractor
*
olaf_ep_extractor_new
(
Olaf_Config
*
config
);
70
75
void
olaf_ep_extractor_print_ep
(
struct
eventpoint
);
76
83
struct
extracted_event_points
*
olaf_ep_extractor_extract
(
Olaf_EP_Extractor
* olaf_ep_extractor,
float
* fft_magnitudes,
int
audioBlockIndex);
84
90
float
*
olaf_ep_extractor_mags
(
Olaf_EP_Extractor
* olaf_ep_extractor);
91
96
void
olaf_ep_extractor_destroy
(
Olaf_EP_Extractor
* olaf_ep_extractor );
97
98
99
#endif
// OLAF_EP_EXTRACTOR_H
olaf_config.h
Olaf configuration pramameters.
olaf_ep_extractor_extract
struct extracted_event_points * olaf_ep_extractor_extract(Olaf_EP_Extractor *olaf_ep_extractor, float *fft_magnitudes, int audioBlockIndex)
Definition
olaf_ep_extractor.c:215
olaf_ep_extractor_print_ep
void olaf_ep_extractor_print_ep(struct eventpoint)
Definition
olaf_ep_extractor.c:119
olaf_ep_extractor_new
Olaf_EP_Extractor * olaf_ep_extractor_new(Olaf_Config *config)
Definition
olaf_ep_extractor.c:42
olaf_ep_extractor_destroy
void olaf_ep_extractor_destroy(Olaf_EP_Extractor *olaf_ep_extractor)
Definition
olaf_ep_extractor.c:76
olaf_ep_extractor_mags
float * olaf_ep_extractor_mags(Olaf_EP_Extractor *olaf_ep_extractor)
Definition
olaf_ep_extractor.c:205
Olaf_Config
Configuration parameters defining the behaviour of Olaf.
Definition
olaf_config.h:51
Olaf_EP_Extractor
Contains state information for event point (EP) extraction.
Definition
olaf_ep_extractor.c:26
Olaf_EP_Extractor::config
Olaf_Config * config
Definition
olaf_ep_extractor.c:27
eventpoint
An event point is a combination of a frequency bin, time bin and magnitude.
Definition
olaf_ep_extractor.h:35
eventpoint::frequencyBin
int frequencyBin
Definition
olaf_ep_extractor.h:36
eventpoint::timeIndex
int timeIndex
Definition
olaf_ep_extractor.h:37
eventpoint::usages
int usages
Definition
olaf_ep_extractor.h:39
eventpoint::magnitude
float magnitude
Definition
olaf_ep_extractor.h:38
extracted_event_points
The result of event point extraction is a list of event points.
Definition
olaf_ep_extractor.h:47
extracted_event_points::eventPointIndex
int eventPointIndex
Definition
olaf_ep_extractor.h:49
extracted_event_points::eventPoints
struct eventpoint * eventPoints
Definition
olaf_ep_extractor.h:48
Generated by
1.14.0