TracktionEngine
Loading...
Searching...
No Matches
engine::AudioFileAnalyser Class Referenceabstract

Interface for a streaming audio-file analyser. More...

#include <tracktion_AudioFileAnalyser.h>

Public Member Functions

virtual ~AudioFileAnalyser ()=default
virtual void prepare (const AudioFileInfo &)=0
 Called once before any audio, with the file's format info.
virtual void process (const juce::AudioBuffer< float > &, int numSamples)=0
 Called repeatedly with successive blocks of the file's audio.
virtual void addResults (juce::DynamicObject &)=0
 Called once after the last block to add this analyser's results to the shared result object.

Detailed Description

Interface for a streaming audio-file analyser.

analyseAudioFile() reads a file once in blocks and feeds every registered analyser, so several analyses share a single pass over the audio. Each analyser adds its results to a shared JSON object. New analysers (tempo, key, onsets...) can be added without changing this API.

Constructor & Destructor Documentation

◆ ~AudioFileAnalyser()

virtual engine::AudioFileAnalyser::~AudioFileAnalyser ( )
virtualdefault

Member Function Documentation

◆ prepare()

virtual void engine::AudioFileAnalyser::prepare ( const AudioFileInfo & )
pure virtual

Called once before any audio, with the file's format info.

◆ process()

virtual void engine::AudioFileAnalyser::process ( const juce::AudioBuffer< float > & ,
int numSamples )
pure virtual

Called repeatedly with successive blocks of the file's audio.

Only the first numSamples of the buffer are valid.

◆ addResults()

virtual void engine::AudioFileAnalyser::addResults ( juce::DynamicObject & )
pure virtual

Called once after the last block to add this analyser's results to the shared result object.


The documentation for this class was generated from the following file: