• 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
Re: Parameter Value Strings and CF retain/release issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameter Value Strings and CF retain/release issues


  • Subject: Re: Parameter Value Strings and CF retain/release issues
  • From: William Stewart <email@hidden>
  • Date: Mon, 04 Oct 2004 11:33:48 -0700

Title: Re: Parameter Value Strings and CF retain/release issues
You can break on these malloc print outs:

br on write (or malloc_printf)

Bill

On 2/10/04 10:58 PM, "Brian Willoughby" <email@hidden> wrote:

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


--
mailto:email@hidden
tel: +1 408 974 4056

__________________________________________________________________________
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
__________________________________________________________________________

 _______________________________________________
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

References: 
 >Parameter Value Strings and CF retain/release issues (From: Brian Willoughby <email@hidden>)

  • Prev by Date: Re: Leaks
  • Next by Date: Re: Leaks
  • Previous by thread: Parameter Value Strings and CF retain/release issues
  • Next by thread: Problems Compiling Examples from XcodeTools1.5__CD Release
  • Index(es):
    • Date
    • Thread