blob: 4de334a1d8f7340cfd84e59760144f6fad818260 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#pragma once
#include <memory>
#include "track/cueinfo.h"
namespace mixxx {
/// Importer class for CueInfo objects that can correct timing offsets when the
/// signal info (channel number, sample rate, bitrate) is known.
class CueInfoImporter {
public:
CueInfoImporter() = default;
explicit CueInfoImporter(const QList<CueInfo>& cueInfos);
virtual ~CueInfoImporter() = default;
/// Returns true if the importer has any cue(s) of the given cueType.
virtual bool hasCueOfType(CueType cueType) const;
/// Returns audio signal dependent timing offset correction.
/// The default implementation just returns 0, but this can be overridden
/// in subclasses.
virtual double guessTimingOffsetMillis(
const QString& filePath,
const audio::SignalInfo& signalInfo) const;
void append(const CueInfo& cueInfo);
void append(const QList<CueInfo>& cueInfos);
int size() const;
bool isEmpty() const;
QList<CueInfo> importCueInfosAndApplyTimingOffset(
const QString& filePath,
const audio::SignalInfo& signalInfo);
private:
QList<CueInfo> m_cueInfos;
};
typedef std::shared_ptr<CueInfoImporter> CueInfoImporterPointer;
} // namespace mixxx
|