summaryrefslogtreecommitdiff
path: root/src/audio/tables/sequence_table.c
blob: c7ab5c0555c7ec82859c9b92f4877bd9d2d696af (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
44
45
46
47
48
49
50
51
#include "attributes.h"
#include "audio.h"
#include "versions.h"

// Symbol definition

#pragma weak gSequenceTable = sSequenceTableHeader

// Externs for table

#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) \
    extern u8 name##_Start[];                                              \
    extern u8 name##_Size[];
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) /*empty*/

#include "tables/sequence_table.h"

#undef DEFINE_SEQUENCE
#undef DEFINE_SEQUENCE_PTR

// Table header

NO_REORDER AudioTableHeader sSequenceTableHeader = {
// The table contains the number of sequences, count them with the preprocessor
#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) 1 +
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) 1 +

#include "tables/sequence_table.h"

#undef DEFINE_SEQUENCE
#undef DEFINE_SEQUENCE_PTR
    0,

    0,
    0x00000000,
    { 0, 0, 0, 0, 0, 0, 0, 0 },
};

// Table body

NO_REORDER AudioTableEntry sSequenceTableEntries[] = {
#define DEFINE_SEQUENCE(name, seqId, storageMedium, cachePolicy, seqFlags) \
    { (u32)name##_Start, (u32)name##_Size, (storageMedium), (cachePolicy), 0, 0, 0 },
#define DEFINE_SEQUENCE_PTR(seqIdReal, seqId, storageMediumReal, cachePolicyReal, seqFlags) \
    { (seqIdReal), 0, (storageMediumReal), (cachePolicyReal), 0, 0, 0 },

#include "tables/sequence_table.h"

#undef DEFINE_SEQUENCE
#undef DEFINE_SEQUENCE_PTR
};