Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
olaf_runner.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
23
24#ifndef OLAF_RUNNER_H
25#define OLAF_RUNNER_H
26
27 #include "olaf_config.h"
28 #include "olaf_db.h"
29 #include "pffft.h"
30
32 #define OLAF_RUNNER_MODE_QUERY 233
34 #define OLAF_RUNNER_MODE_STORE 434
36 #define OLAF_RUNNER_MODE_DELETE 653
38 #define OLAF_RUNNER_MODE_PRINT 9043
40 #define OLAF_RUNNER_MODE_CACHE 2342
41
42
43
53 typedef struct Olaf_Runner Olaf_Runner;
54
57
58 int mode;
59
61
63
64 float *fft_in;
65 float *fft_out;
66
68 FILE * fp_meta_file;
69 };
70
81 Olaf_Runner * olaf_runner_new(int mode, Olaf_Config * config, FILE * fp_cache_file, FILE * fp_meta_file);
82
88 void olaf_runner_destroy(Olaf_Runner * runner);
89
90#endif //OLAF_RUNNER_H
Olaf configuration pramameters.
Olaf fingerprint database.
void olaf_runner_destroy(Olaf_Runner *runner)
Delete the resources related to the runner.
Definition olaf_runner.c:44
Olaf_Runner * olaf_runner_new(int mode, Olaf_Config *config, FILE *fp_cache_file, FILE *fp_meta_file)
Create a new runner.
Definition olaf_runner.c:7
PFFFT : a Pretty Fast FFT.
Configuration parameters defining the behaviour of Olaf.
Definition olaf_config.h:51
A struct with state information on the data store.
Definition olaf_db.c:27
Helps to run query, store, delete or print commands. These share a lot of functionality but differ in...
Definition olaf_runner.h:55
int mode
Definition olaf_runner.h:58
PFFFT_Setup * fftSetup
Definition olaf_runner.h:62
Olaf_DB * db
Definition olaf_runner.h:60
float * fft_in
Definition olaf_runner.h:64
float * fft_out
Definition olaf_runner.h:65
Olaf_Config * config
Definition olaf_runner.h:56
FILE * fp_meta_file
Definition olaf_runner.h:68
FILE * fp_cache_file
Definition olaf_runner.h:67
Internal state for a PFFFT transform instance.
Definition pffft.c:1200