• 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: AudioFileGetProperty possible bug???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioFileGetProperty possible bug???


  • Subject: Re: AudioFileGetProperty possible bug???
  • From: William Stewart <email@hidden>
  • Date: Thu, 16 Sep 2010 17:38:00 -0700

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?
--
GW Rodriguez
Sound Supervisor
Olney Theatre Center
(c) 909-720-4202
www.gwrodriguez.com
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: 
 >AudioFileGetProperty possible bug??? (From: GW Rodriguez <email@hidden>)
 >Re: AudioFileGetProperty possible bug??? (From: William Stewart <email@hidden>)

  • Prev by Date: Re: AudioFileGetProperty possible bug???
  • Next by Date: Migrating 10.4 AudioUnit project?
  • Previous by thread: Re: AudioFileGetProperty possible bug???
  • Next by thread: Confusion with AudioStreamBasicDescription
  • Index(es):
    • Date
    • Thread