diff options
author | Chris Robinson <[email protected]> | 2013-12-25 19:50:46 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-12-25 19:50:46 -0800 |
commit | b5ae424dbd400abf6287cad94bea77143d0dcc2a (patch) | |
tree | b645c51f601dd9a40ec543849203bbc74a1b0bc3 | |
parent | 677b864565d6be9423197ce09dba43579fe20405 (diff) |
Store a list of sounds in the preset
-rw-r--r-- | Alc/midi/base.c | 9 | ||||
-rw-r--r-- | OpenAL32/Include/alMidi.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c index dfa6d1ec..cd6293d2 100644 --- a/Alc/midi/base.c +++ b/Alc/midi/base.c @@ -368,15 +368,24 @@ void ALsfpreset_Construct(ALsfpreset *self) self->Preset = 0; self->Bank = 0; + self->Sounds = NULL; + self->NumSounds = 0; self->id = 0; } void ALsfpreset_Destruct(ALsfpreset *self) { + ALsizei i; + FreeThunkEntry(self->id); self->id = 0; + for(i = 0;i < self->NumSounds;i++) + DecrementRef(&self->Sounds[i]->ref); + free(self->Sounds); + self->Sounds = NULL; + self->NumSounds = 0; } diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h index 38042693..cd5249a2 100644 --- a/OpenAL32/Include/alMidi.h +++ b/OpenAL32/Include/alMidi.h @@ -69,6 +69,8 @@ typedef struct ALsfpreset { ALint Preset; /* a.k.a. MIDI program number */ ALint Bank; /* MIDI bank 0...127, or percussion (bank 128) */ + ALfontsound **Sounds; + ALsizei NumSounds; ALuint id; } ALsfpreset; |