[fpc-pascal] Mac OSX API call
Vincent Snijders
vsnijders at quicknet.nl
Fri Aug 29 12:26:31 CEST 2008
EarMaster - Bent Olsen schreef:
> Extern OSStatus
> AudioFileReadPackets ( AudioFileID inAudioFile,
> Boolean inUseCache,
> UInt32 *outNumBytes,
> AudioStreamPacketDescription
> *outPacketDescriptions,
> SInt64 inStartingPacket,
> UInt32 *ioNumPacket,
> void *outBuffer)
> AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER;
>
>
> I've translated this to:
>
> function AudioFileReadPacket(inAudioFile: AudioFileID;
> inUseCache: Boolean;
> var outNumBytes: UInt32;
> var outPacketDescriptions:
> AudioStreamPacketDescription; //also tried Pointer
> inStartingPacket: SInt64;
> var ioNumPacket: UInt32;
> var outBuffer: Pointer): OSStatus; external
> name '_AudioFileReadPackets'; mwpascal;
>
I think it should be (no var for the pointer):
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