blob: d1f6bcf46b4c14f38c881666b420acdba667e568 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <dolphin/dolphin.h>
#include <dolphin/syn.h>
#include "sdk_math.h"
#include "__syn.h"
int __SYNGetWavetableData(SYNVOICE* voice) {
u32 regionIndex;
SYNSYNTH* synth;
synth = voice->synth;
regionIndex = synth->inst[voice->midiChannel]->keyRegion[voice->keyNum];
if (regionIndex == 0xFFFF) {
return 0;
}
voice->region = &synth->region[regionIndex];
voice->art = &synth->art[voice->region->articulationIndex];
voice->sample = &synth->sample[voice->region->sampleIndex];
voice->adpcm = &synth->adpcm[voice->sample->adpcmIndex];
return 1;
}
|