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-2023 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
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
59
typedef
struct
Olaf_EP_Extractor
Olaf_EP_Extractor
;
60
66
Olaf_EP_Extractor
*
olaf_ep_extractor_new
(
Olaf_Config
* config);
67
72
void
olaf_ep_extractor_print_ep
(
struct
eventpoint
);
73
80
struct
extracted_event_points
*
olaf_ep_extractor_extract
(
Olaf_EP_Extractor
* olaf_ep_extractor,
float
* fft_magnitudes,
int
audioBlockIndex);
81
86
void
olaf_ep_extractor_destroy
(
Olaf_EP_Extractor
* olaf_ep_extractor );
87
88
89
#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:201
olaf_ep_extractor_print_ep
void olaf_ep_extractor_print_ep(struct eventpoint)
Definition:
olaf_ep_extractor.c:109
olaf_ep_extractor_new
Olaf_EP_Extractor * olaf_ep_extractor_new(Olaf_Config *config)
Definition:
olaf_ep_extractor.c:49
olaf_ep_extractor_destroy
void olaf_ep_extractor_destroy(Olaf_EP_Extractor *olaf_ep_extractor)
Definition:
olaf_ep_extractor.c:85
Olaf_Config
Configuration parameters defining the behaviour of Olaf.
Definition:
olaf_config.h:48
Olaf_EP_Extractor
Contains state information for event point (EP) extraction.
Definition:
olaf_ep_extractor.c:26
eventpoint
An event point is a combination of a frequency bin, time bin and magnitude.
Definition:
olaf_ep_extractor.h:35
extracted_event_points
The result of event point extraction is a list of event points.
Definition:
olaf_ep_extractor.h:47
Generated by
1.9.6