Re: Major AUMIDISynth memory leak?
Re: Major AUMIDISynth memory leak?
- Subject: Re: Major AUMIDISynth memory leak?
- From: Archagon <email@hidden>
- Date: Wed, 13 Jul 2016 14:03:37 -0700
Update for posterity! After investigating the leak, it turns out that
the problem was not with AUMIDISynth, but with AUSampler. If you try
to retrieve the metadata of a kAudioUnitSubType_Sampler like this:
CFPropertyListRef myClassData;
UInt32 size = sizeof(CFPropertyListRef);
AudioUnitGetProperty(sampler,
kAudioUnitProperty_ClassInfo,
kAudioUnitScope_Global,
0,
&myClassData,
&size);
CFRelease(myClassData);
...then there will be a leak after the graph is torn down. For a
~100MB SF2 file, this leak is about 500kb per invocation. I was using
an inaudible AUSampler to retrieve SF2 metadata (instrument ranges,
etc.), since AUMIDISynth could not do it. Sadly, since my app requires
tearing down the audio graph quite frequently, this is no longer a
practical solution. Oh well; will just bake all the metadata into a
plist. (Unless I'm doing something horribly wrong in my
kAudioUnitProperty_ClassInfo invocation and someone can set me
straight.)
I've filed radar #27290720, along with a simple test case:
https://github.com/archagon/ausampler-memory-leak-demo
On Fri, Jul 8, 2016 at 4:42 PM, Archagon <email@hidden> wrote:
>
> Sorry, I made a mistake: 10 x 10 AudioUnit instances was my old
> architecture. Now that I'm using AUMIDISynth instead of AUSampler,
> it's only 1 AudioUnit per "instrument". So there's only 10 synth
> AudioUnits in a 10-instrument document, each with 16 channels active.
> But the rest still applies.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden