summaryrefslogtreecommitdiffstats
path: root/src/analyser.h
blob: 65e9e41df5ea1ad5ea4c5392d6b8e76611ad2bb3 (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
27
#ifndef ANALYSER_H
#define ANALYSER_H

#include "util/types.h"

/*
 * An Analyser 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 "trackinfoobject.h"

class Analyser {

public:
    virtual bool initialise(TrackPointer tio, int sampleRate, int totalSamples) = 0;
    virtual bool loadStored(TrackPointer tio) const = 0;
    virtual void process(const CSAMPLE* pIn, const int iLen) = 0;
    virtual void cleanup(TrackPointer tio) = 0;
    virtual void finalise(TrackPointer tio) = 0;
    virtual ~Analyser() {}
};

#endif