diff options
author | Chris Robinson <[email protected]> | 2013-12-25 19:13:59 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-25 19:13:59 -0800 |
commit | 94ddc5cb1889a42c9ffe98b79e431b596a9563df (patch) | |
tree | b513f8c94347fb697775e286c735ee79dcc201dd /Alc/midi/base.c | |
parent | cb3f82a4bf50aef28353629f2f7d6f45b5d420dc (diff) |
Add a new fontsound object type
This is basically a combined preset and intrument zone with sample header.
Diffstat (limited to 'Alc/midi/base.c')
-rw-r--r-- | Alc/midi/base.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index 0d81952b..33c39133 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -421,6 +421,53 @@ void ALsfinstrument_Destruct(ALsfinstrument *self) } +void ALfontsound_Construct(ALfontsound *self) +{ + self->ref = 0; + + self->MinKey = 0; + self->MaxKey = 127; + self->MinVelocity = 0; + self->MaxVelocity = 127; + + self->Generators = NULL; + self->NumGenerators = 0; + self->GeneratorsMax = 0; + + self->Modulators = NULL; + self->NumModulators = 0; + self->ModulatorsMax = 0; + + self->Start = 0; + self->End = 0; + self->LoopStart = 0; + self->LoopEnd = 0; + self->SampleRate = 0; + self->PitchKey = 0; + self->PitchCorrection = 0; + self->SampleLink = 0; + self->SampleType = AL_NONE; + + self->id = 0; +} + +void ALfontsound_Destruct(ALfontsound *self) +{ + free(self->Modulators); + self->Modulators = NULL; + self->NumModulators = 0; + self->ModulatorsMax = 0; + + free(self->Generators); + self->Generators = NULL; + self->NumGenerators = 0; + self->GeneratorsMax = 0; + + FreeThunkEntry(self->id); + self->id = 0; +} + + void ALsfpreset_Construct(ALsfpreset *self) { self->ref = 0; |