Open Enigma644 opened 8 years ago
howdy-
thanks for letting me know about this. i don't have an iOS 10 SDK at my disposal right now, but i made some changes- if you could please let me know if they resolve your issue i'd appreciate it!
cheers : : ray
Awesome, thank you. iOS9 and iOS10 are now behaving the same.
I am however noticing problems with the fraction microseconds (in any iOS). In the test utils that I'm using they are showing the microseconds not changing, but looking at the packet you are creating, it looks to me like the timetag is built correctly. Can I ask what test tool you're using? I'm testing with oscP5.
FYI other libs have the second component as a fraction of 4294967296 eg: http://cim.mcgill.ca/sresvn/audioscape/audioscape_resources/PDa/extra/dumpOSC.c
After a bunch of testing, I'm 99% sure you should have:
uint32_t time_us = CFSwapInt32HostToBig((uint32_t)floor((double)4294967296.0 * ((double)(interval - floor(interval)))));
you are, of course, correct- nice catch, thanks for the tip! just pushed some changes, please let me know if you have any more problems.
Something weird is going on with iOS 10 with these two lines in OSCBundle (lines 218, 219):
I'm not sure what is happening, but NSSwapHostLongToBig is just not giving out the same results on iOS 10 vs iOS 9. As a result the bundle time is getting totally messed up. I think it's got to do with LONG_MAX being much higher on my x64 iOS 10 iPhone 6 test device.
Also of note, on line 218, (interval - time_s) should be (interval - floor(interval)).