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-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
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
31 #define OLAF_RUNNER_MODE_QUERY 233
32 #define OLAF_RUNNER_MODE_STORE 434
33 #define OLAF_RUNNER_MODE_DELETE 653
34 #define OLAF_RUNNER_MODE_PRINT 9043
35
42 typedef struct Olaf_Runner Olaf_Runner;
43
45 //the olaf configuration
46 Olaf_Config * config;
47
48 int mode;
49
50 //The database
51 Olaf_DB* db;
52
53 //The fft struct that is reused
54 PFFFT_Setup *fftSetup;
55
56 //In and output fft data
57 float *fft_in;
58 float *fft_out;
59 };
60
68 Olaf_Runner * olaf_runner_new(int mode);
69
75 void olaf_runner_destroy(Olaf_Runner * runner);
76
77#endif //OLAF_RUNNER_H
Olaf configuration pramameters.
Olaf fingerprint database.
Olaf_Runner * olaf_runner_new(int mode)
Create a new runner.
Definition: olaf_runner.c:7
void olaf_runner_destroy(Olaf_Runner *runner)
Delete the resources related to the runner.
Definition: olaf_runner.c:48
PFFFT : a Pretty Fast FFT.
Configuration parameters defining the behaviour of Olaf.
Definition: olaf_config.h:48
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:44
Definition: pffft.c:1197