• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Parameter Value Strings and CF retain/release issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parameter Value Strings and CF retain/release issues


  • Subject: Parameter Value Strings and CF retain/release issues
  • From: Brian Willoughby <email@hidden>
  • Date: Sat, 2 Oct 2004 22:58:52 -0700

I have written an audio unit which has an Indexed Parameter, and I seem to be having problems with retain/release of the CoreFoundation objects. This all made much more sense to me in ObjC, so can anyone tell me what I'm doing wrong below? The AU works, but there is a Segmentation fault when running auval which says:

*** malloc[4623]: error for object 0xa5580: Incorrect checksum for freed object - object was probably modified after being freed; break at szone_error

Here is the code:

ComponentResult gain::GetParameterValueStrings( AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
CFArrayRef * outStrings)
{
if ((inScope == kAudioUnitScope_Global) && (inParameterID == kParam_Gain))
{
if (outStrings == NULL)
return noErr; //called by GetPropInfo
CFStringRef strings[16];
for (int i = 0; i < 16; i++)
{
strings[i] = CFStringCreateWithFormat(NULL, NULL, CFSTR("%7.4g dB"), i * 6.02060L);
}
*outStrings = CFArrayCreate(NULL, (const void **)strings, 16, &kCFTypeArrayCallBacks);
return noErr;
}
return kAudioUnitErr_InvalidProperty;
}
 _______________________________________________
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

  • Follow-Ups:
    • Re: Parameter Value Strings and CF retain/release issues
      • From: William Stewart <email@hidden>
  • Prev by Date: Segmentation fault when testing with auval 1.1.1b11
  • Next by Date: Problems Compiling Examples from XcodeTools1.5__CD Release
  • Previous by thread: Segmentation fault when testing with auval 1.1.1b11
  • Next by thread: Re: Parameter Value Strings and CF retain/release issues
  • Index(es):
    • Date
    • Thread