-
Notifications
You must be signed in to change notification settings - Fork 1
/
FormatoUltraFodaData.h
64 lines (46 loc) · 1.1 KB
/
FormatoUltraFodaData.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef FUF_DATA_H
#define FUF_DATA_H
#define COMPRESSION_MODE_COUNT 3
#include <stdio.h>
#include "Wave.h"
#include "Huffman.h"
enum compressMode {
NONE = 0,
HUFFMAN = 1,
DIFFERENCE = 2,
TRANSFORM = 3
};
struct FUFHeader {
WaveInfo info;
compressMode modes[COMPRESSION_MODE_COUNT];
int bytesPerSample;
int compressCount;
int channelCount;
long huffmanHeaderSize;
long dataSize;
};
class FormatoUltraFodaData {
private:
int channelCount;
int dataLength;
int** data;
int* serialData;
public:
FormatoUltraFodaData(WaveData*);
FormatoUltraFodaData(const char* filename);
~FormatoUltraFodaData() {}
int getChannelCount();
int* getData(int channel);
int getDataLength();
int* getDataFromAllChannels();
void setData(int channel, int* data, int length);
void writeHeaders(FILE*, WaveInfo, compressMode*, int);
void writeData(FILE*);
FUFHeader fHeader;
Huffman huff;
double** zData;
char* hData;
bool hasHuffman;
bool hasTransform;
};
#endif // FUF_DATA_H