XX CMake Package
Loading...
Searching...
No Matches
XXSampleAbstract.h
Go to the documentation of this file.
1#ifndef XXSampleAbstractH
2#define XXSampleAbstractH
3
4#include "XXAudioExportDef.h"
5
6#include <QList>
7#include <QString>
8
9namespace XX
10{
11 namespace Sample
12 {
14 using Data = QList<float>;
15
17 using Channels = QList<Data>;
18
21
23 {
24 uint8_t noOfChannels = 1;
25 uint16_t sampleRate = 1;
26 size_t numberOfSamples = 0;
27
28 size_t noOfSamplesPerChannel() const;
29 double totalLength() const;
30 };
31
34
36 {
37 public:
39
40 protected:
41 virtual bool load(const QString& fileName) = 0;
42 virtual bool save(const QString& fileName) = 0;
43
44 static Data interlace(const Channels& input);
45 static Channels deinterlace(const Data& input, const uint8_t numberOfChannels = 2);
46
47 protected:
50 };
51 } // namespace Sample
52} // namespace XX
53
54#endif // NOT XXSampleAbstractH
#define XXAUDIO_DECLSPEC
Definition XXAudioExportDef.h:11
virtual bool save(const QString &fileName)=0
Data interlacedContent
Definition XXSampleAbstract.h:48
static Channels deinterlace(const Data &input, const uint8_t numberOfChannels=2)
static Data interlace(const Channels &input)
virtual bool load(const QString &fileName)=0
Meta meta
Definition XXSampleAbstract.h:49
QList< Data > Channels
Definition XXSampleAbstract.h:17
QList< float > Data
Definition XXSampleAbstract.h:14
Definition XXSampleAbstract.h:12
Definition XXPopulatedAbstract.h:11
meta data of audio sample
Definition XXSampleAbstract.h:23
double totalLength() const
size_t numberOfSamples
Definition XXSampleAbstract.h:26
uint8_t noOfChannels
Definition XXSampleAbstract.h:24
size_t noOfSamplesPerChannel() const
uint16_t sampleRate
Definition XXSampleAbstract.h:25