Re: How to convert an AudioUnit in to a FSRef (or FSSpec)?
Re: How to convert an AudioUnit in to a FSRef (or FSSpec)?
- Subject: Re: How to convert an AudioUnit in to a FSRef (or FSSpec)?
- From: Robert Grant <email@hidden>
- Date: Mon, 10 Nov 2003 07:20:31 -0500
Hi Jeremy,
That's an interesting question - I've been trying to do something
similar which is to get the icon for a component. I've found the
"GetComponentIconSuite" function that sounds good but when I try it as
follows:
IconSuiteRef suite = NULL;
OSErr err = GetComponentIconSuite(comp, &suite);
if (err) {
NSLog(@"GetComponentIconSuite err: %ld", err);
}
if (!err && suite != nil) {
HLock(suite);
IconFamilyHandle familyHandle = NULL;
err = IconSuiteToIconFamily(suite, kSelectorAll32BitData,
&familyHandle);
if (!err) {
IconFamily* family = [IconFamily
iconFamilyWithIconFamilyHandle: familyHandle];
m_icon = [[family imageWithAllReps] retain];
} else
NSLog(@"IconSuiteToIconFamily err: %ld", err);
HUnlock(suite);
}
(The IconFamily class is from here:
http://homepage.mac.com/troy_stephens/software/objects/IconFamily/)
But when I try it the IconSuiteToIconFamily function fails with -108.
Is there a better way to find an icon for the component?
Thanks,
Robert.
On Nov 6, 2003, at 9:05 PM, Jeremy Sagan wrote:
How do I convert an AudioUnit in to a FSRef (or FSSpec)? I would like
to be able to find the location in the finder of an audiounit.
Thanks,
Jeremy
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.