Olaf
Overly Lightweight Acoustic Fingerprinting
|
Reads audio samples from a file in blocks of samples with a certain overlap. More...
#include "olaf_config.h"
Go to the source code of this file.
Typedefs | |
typedef struct Olaf_Reader | Olaf_Reader |
Functions | |
Olaf_Reader * | olaf_reader_new (Olaf_Config *config, const char *source) |
Create a new reader. | |
size_t | olaf_reader_read (Olaf_Reader *olaf_reader, float *block) |
Read an audio block with overlap. | |
size_t | olaf_reader_total_samples_read (Olaf_Reader *olaf_reader) |
Returns the number of samples read. | |
void | olaf_reader_destroy (Olaf_Reader *olaf_reader) |
Free resources related to the reader. | |
Reads audio samples from a file in blocks of samples with a certain overlap.
The configuration determines the block sizes and overlap between blocks.
void olaf_reader_destroy | ( | Olaf_Reader * | olaf_reader | ) |
Free resources related to the reader.
olaf_reader | The olaf reader state. |
Olaf_Reader * olaf_reader_new | ( | Olaf_Config * | config, |
const char * | source | ||
) |
Create a new reader.
config | The configuration | |
[in] | source | The path of the audio file. The audio file should be a raw mono file of a certain format. |
size_t olaf_reader_read | ( | Olaf_Reader * | olaf_reader, |
float * | block | ||
) |
Read an audio block with overlap.
olaf_reader | The olaf reader |
block | An array to store the audio samples. |
size_t olaf_reader_total_samples_read | ( | Olaf_Reader * | olaf_reader | ) |
Returns the number of samples read.
olaf_reader | The olaf reader state. |