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/dummy.c | |
parent | d8bfd12d313372830f0e0b34fafcaa244395cf3c (diff) |
Use a void* for the MidiSynth Delete method param
Diffstat (limited to 'Alc/midi/dummy.c')
-rw-r--r-- | Alc/midi/dummy.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Alc/midi/dummy.c b/Alc/midi/dummy.c index 79f82b87..07121051 100644 --- a/Alc/midi/dummy.c +++ b/Alc/midi/dummy.c @@ -27,7 +27,7 @@ static DECLARE_FORWARD(DSynth, MidiSynth, void, stop) static DECLARE_FORWARD(DSynth, MidiSynth, void, reset) static DECLARE_FORWARD1(DSynth, MidiSynth, void, update, ALCdevice*) static void DSynth_process(DSynth *self, ALuint SamplesToDo, ALfloat (*restrict DryBuffer)[BUFFERSIZE]); -static void DSynth_Delete(DSynth *self); +DECLARE_DEFAULT_ALLOCATORS(DSynth) DEFINE_MIDISYNTH_VTABLE(DSynth); @@ -63,20 +63,15 @@ static void DSynth_process(DSynth *self, ALuint SamplesToDo, ALfloatBUFFERSIZE*r } -static void DSynth_Delete(DSynth *self) -{ - free(self); -} - - MidiSynth *DSynth_create(ALCdevice *device) { - DSynth *synth = calloc(1, sizeof(*synth)); + DSynth *synth = DSynth_New(sizeof(*synth)); if(!synth) { ERR("Failed to allocate DSynth\n"); return NULL; } + memset(synth, 0, sizeof(*synth)); DSynth_Construct(synth, device); return STATIC_CAST(MidiSynth, synth); } |