Store a list of sounds in the preset
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user