diff options
author | Chris Robinson <[email protected]> | 2014-03-22 01:49:03 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-03-22 01:49:03 -0700 |
commit | 22f6eb18a24c91e0e8a9c060de5690533e075429 (patch) | |
tree | 5739f13936fee434e89ab4a581c3179c0cd71692 /Alc/midi/fluidsynth.c | |
parent | d8bfd12d313372830f0e0b34fafcaa244395cf3c (diff) |
Use a void* for the MidiSynth Delete method param
Diffstat (limited to 'Alc/midi/fluidsynth.c')
-rw-r--r-- | Alc/midi/fluidsynth.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c index d4e594e6..504b42ec 100644 --- a/Alc/midi/fluidsynth.c +++ b/Alc/midi/fluidsynth.c @@ -476,7 +476,7 @@ static void FSynth_reset(FSynth *self); static void FSynth_update(FSynth *self, ALCdevice *device); static void FSynth_processQueue(FSynth *self, ALuint64 time); static void FSynth_process(FSynth *self, ALuint SamplesToDo, ALfloat (*restrict DryBuffer)[BUFFERSIZE]); -static void FSynth_Delete(FSynth *self); +DECLARE_DEFAULT_ALLOCATORS(FSynth) DEFINE_MIDISYNTH_VTABLE(FSynth); static fluid_sfont_t *FSynth_loadSfont(fluid_sfloader_t *loader, const char *filename); @@ -798,20 +798,15 @@ static void FSynth_process(FSynth *self, ALuint SamplesToDo, ALfloat (*restrict } -static void FSynth_Delete(FSynth *self) -{ - free(self); -} - - MidiSynth *FSynth_create(ALCdevice *device) { - FSynth *synth = calloc(1, sizeof(*synth)); + FSynth *synth = FSynth_New(sizeof(*synth)); if(!synth) { ERR("Failed to allocate FSynth\n"); return NULL; } + memset(synth, 0, sizeof(*synth)); FSynth_Construct(synth, device); if(FSynth_init(synth, device) == AL_FALSE) |