Re: Trying to Swap Byte on Floats
Re: Trying to Swap Byte on Floats
- Subject: Re: Trying to Swap Byte on Floats
- From: Manfred Schwind <email@hidden>
- Date: Thu, 21 Jun 2007 14:01:35 +0200
The binary file was encoded using a PowerPC big-endian format.
float SSR = NSConvertSwappedFloatToHost(NSConvertHostFloatToSwapped
(tempSSR));
This doesn't do anything - it just converts the type from float to
NSSwappedFloat and back to float, without doing any actual swapping.
I think this is the correct way in your case:
float SSR = NSSwapBigFloatToHost(NSConvertHostFloatToSwapped(tempSSR));
Regards,
Mani
--
http://www.mani.de
iVolume - Loudness adjustment for iTunes.
LittleSecrets - The encrypted notepad.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden