Re: Getting node class data
Re: Getting node class data
- Subject: Re: Getting node class data
- From: Bill Stewart <email@hidden>
- Date: Tue, 15 Oct 2002 18:16:40 -0700
on 15/10/02 7:54 AM, Robert Grant wrote:
>
Sorry for all these questions....
Don't be.
>
I'm trying to save the class data for a node, here's my code:
>
>
- (void)encodeWithCoder:(NSCoder*)coder
>
{
>
void* bytes;
>
UInt32 size;
>
OSStatus status = AUGraphGetNodeInfo(m_graph, m_node, NULL, &size,
>
NULL, NULL);
>
NSLog(@"GetNodeInfo status: %d", status);
>
bytes = malloc(size);
>
status = AUGraphGetNodeInfo(m_graph, m_node, NULL, &size, &bytes,
>
NULL);
>
NSLog(@"GetNodeInfo status: %d", status);
>
>
[coder encodeBytes: bytes length: size];
>
free(bytes);
>
}
>
>
First I'm getting the size of the class data and then malloc'ing a
>
buffer
>
of that size.
>
>
The problem is that size is coming back 0. This shouldn't be the case
>
should it?
>
This is happening with any node I try it on.
Ah... That would be a bug...
The class data that you get back from an AudioUnit is a CFPropertyList (See
the docs on this in the SDK)... So, just pass a pointer into one of these
guys and you should be OK (I'll fix this bug...)
Bill
>
Thanks,
>
>
Robert.
>
_______________________________________________
>
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.
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
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.