Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
olaf_reader.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
25#ifndef OLAF_READER_H
26#define OLAF_READER_H
27
28 #include "olaf_config.h"
29
30
38 typedef struct Olaf_Reader Olaf_Reader;
39
48 Olaf_Reader * olaf_reader_new(Olaf_Config * config,const char * source);
49
58 size_t olaf_reader_read(Olaf_Reader * olaf_reader,float * block);
59
67 size_t olaf_reader_total_samples_read(Olaf_Reader * olaf_reader);
68
74 void olaf_reader_destroy(Olaf_Reader * olaf_reader);
75
76
77#endif // OLAF_READER_H
Olaf configuration pramameters.
void olaf_reader_destroy(Olaf_Reader *olaf_reader)
Free resources related to the reader.
Definition: olaf_reader_stream.c:103
Olaf_Reader * olaf_reader_new(Olaf_Config *config, const char *source)
Create a new reader.
Definition: olaf_reader_stream.c:43
size_t olaf_reader_read(Olaf_Reader *olaf_reader, float *block)
Read an audio block with overlap.
Definition: olaf_reader_stream.c:67
size_t olaf_reader_total_samples_read(Olaf_Reader *olaf_reader)
Returns the number of samples read.
Definition: olaf_reader_stream.c:99
Configuration parameters defining the behaviour of Olaf.
Definition: olaf_config.h:48
The state information.
Definition: olaf_reader_stream.c:27