-
Notifications
You must be signed in to change notification settings - Fork 9
/
Capcom DSP ADPCM.bt
76 lines (71 loc) · 1.5 KB
/
Capcom DSP ADPCM.bt
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
64
65
66
67
68
69
70
71
72
73
74
75
76
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
typedef struct{
uint uint1;
uint uint2;
}uintBlock;
typedef enum<byte>{
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
}MonthEnum;
typedef struct{
char tIME[4];
uint size;
short Year;
MonthEnum Month;
byte Day;
byte Hour;
byte Minute;
byte Second;
byte NULL;
}tIME;
string readTIME(tIME &t){
string s;
SPrintf(s, "%s %u, %u - %02u:%02u:%02u", EnumToString(t.Month), t.Day, t.Year, t.Hour, t.Minute, t.Second);
return s;
}
uint DPSWMagic<bgcolor=0x000000>;
if(DPSWMagic == 1464881988){
//file is currently in LIT endian
BigEndian();
//doing it like this means we preserve the user's default endian, while still reading the file properly
};
uint unkn;//loop flag?
uint fileLength<bgcolor=0xFFFFFF>;
uint unkn4;
uint loopBegin<bgcolor=0xFF0000>;
uint loopEnd<bgcolor=0x0000FF>;
uint numChannels;
uint totalSamples<bgcolor=0xF00FF0>;
uint totalSamples2<bgcolor=0xF00FF0>;
uint unkn5;
uint sampleRate;
uint unkn3[16];
uint buffer[5];
/*
char mrkrMagic[4];
uint mrkrLength;
uintBlock mrkrBlock[mrkrLength/8];
*///not always present in files, so commented out
FSeek(fileLength-16);
tIME timeBlock<read=readTIME>;