summaryrefslogtreecommitdiffstats
path: root/src/analyzer/analyzer.h
blob: 4e55e6432ca8101591550ac40229f2610ce34940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef ANALYZER_ANALYZER_H
#define ANALYZER_ANALYZER_H

#include "util/types.h"

/*
 * An Analyzer is an object which wants to process an entire song to
 * calculate some kind of metadata about it. This could be bpm, the
 * summary, key or something else crazy. This is to help consolidate the
 * many different threads currently processing the whole track in Mixxx on load.
 *   -- Adam
 */

#include "track/track.h"

class Analyzer {
  public:
    virtual bool initialize(TrackPointer tio, int sampleRate, int totalSamples) = 0;
    virtual bool isDisabledOrLoadStoredSuccess(TrackPointer tio) const = 0;
    virtual void process(const CSAMPLE* pIn, const int iLen) = 0;
    virtual void cleanup(TrackPointer tio) = 0;
    virtual void finalize(TrackPointer tio) = 0;
    virtual ~Analyzer() {}
};

#endif