[fpc-pascal] Mac OSX API call

EarMaster - Bent Olsen bent at earmaster.com
Fri Aug 29 12:58:15 CEST 2008

> -----Original Message-----
> From: fpc-pascal-bounces at lists.freepascal.org [mailto:fpc-pascal-
> bounces at lists.freepascal.org] On Behalf Of Vincent Snijders
> Sent: 29. august 2008 12:27
> To: FPC-Pascal users discussions
> Subject: Re: [fpc-pascal] Mac OSX API call
> I think it should be (no var for the pointer):

I tried, and same result.

Could a Mac OSX API call return -50 even though the types are correct, but
the contents of them are not what it expected?

I would assume -50 is only after a check for types in the parameter list,
and check is done before even calling the API.


> function AudioFileReadPacket(inAudioFile: AudioFileID;
>                               inUseCache: Boolean;
>                               var outNumBytes: UInt32;
>                               var outPacketDescriptions:
> AudioStreamPacketDescription; //also tried Pointer
>                               inStartingPacket: SInt64;
>                               var ioNumPacket: UInt32;
>                               outBuffer: Pointer): OSStatus; external
> name '_AudioFileReadPackets'; mwpascal;
> Vincent

More information about the fpc-pascal mailing list