Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
olaf_ep_extractor.h File Reference

Olaf event point extractor. More...

#include "olaf_config.h"

Go to the source code of this file.

Data Structures

struct  eventpoint
 An event point is a combination of a frequency bin, time bin and magnitude. More...
 
struct  extracted_event_points
 The result of event point extraction is a list of event points. More...
 

Typedefs

typedef struct Olaf_EP_Extractor Olaf_EP_Extractor
 

Functions

Olaf_EP_Extractorolaf_ep_extractor_new (Olaf_Config *config)
 
void olaf_ep_extractor_print_ep (struct eventpoint)
 
struct extracted_event_pointsolaf_ep_extractor_extract (Olaf_EP_Extractor *olaf_ep_extractor, float *fft_magnitudes, int audioBlockIndex)
 
void olaf_ep_extractor_destroy (Olaf_EP_Extractor *olaf_ep_extractor)
 

Detailed Description

Olaf event point extractor.

This defines the interface on how event points (EPs or eps) are extracted from audio blocks.

Function Documentation

◆ olaf_ep_extractor_destroy()

void olaf_ep_extractor_destroy ( Olaf_EP_Extractor olaf_ep_extractor)

Free memory or other resources.

Parameters
olaf_ep_extractorThe EP extractor to destroy.

◆ olaf_ep_extractor_extract()

struct extracted_event_points * olaf_ep_extractor_extract ( Olaf_EP_Extractor olaf_ep_extractor,
float *  fft_magnitudes,
int  audioBlockIndex 
)

The actual extract method which extracts event points from the current fft magnitudes.

Parameters
olaf_ep_extractorThe EP extractor to destroy.
fft_magnitudesThe fft magnitudes for the current audio block.
audioBlockIndexThe audio block time index.

◆ olaf_ep_extractor_new()

Olaf_EP_Extractor * olaf_ep_extractor_new ( Olaf_Config config)

Initialize a new Olaf_EP_Extractor struct according to the given configuration.

Parameters
configThe configuration currenlty in use.
Returns
An initialized Olaf_EP_Extractor struct or undefined if memory could not be allocated.

◆ olaf_ep_extractor_print_ep()

void olaf_ep_extractor_print_ep ( struct eventpoint  e)

A helper (debug) method to print a single event point.

Parameters
eventpointThe event point to print.