I should clarify this:
(1) The argument size of the parameter is a 32 bit number (as the prototype describes)
(2) The value of the property (AudioDataPacketCount) can be up to a 64 bit signed value
So, nPackets, is a 64bit signed number, it is used to retrieve the audio data packet count value.
The size of nPackets, is 4 bytes (sizeof(nPackets) this is the size of the value of the "container" that is used to retrieve that value
The sample correctly uses both the size and value container with the correct data types (UInt32 and SInt64 respectively)
Bill
On Sep 16, 2010, at 4:49 PM, William Stewart wrote: The property size parameter is a 32bit pointer, so you should change the type to that
Bill On Sep 15, 2010, at 5:19 PM, GW Rodriguez wrote: I am using the AudioFileGetProperty function to get the total packet count with the property: kAudioFilePropertyAudioDataPacketCount. Here is an example of this being used:
UInt64 nPackets;
UInt64 packetSize = sizeof(nPacket); AudioFileGetProperty(audioFile, kAudioFilePropertyAudioDataPacketCount, &packetSize, &nPackets);
The issue I am having is that I get a warning "Passing argument 3 of AudioFileGetProperty from incompatible pointer type". But the program runs fine. I know that the function AudioFileGetProperty is looking for argument 3 to be type UInt32 but even in the technical note TN2097 this is how they use this function.
Is this a bug? Should I just continue to ignore it?
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
|