Add a loop variable for PPSampleObject that returns an NSRange.
Fix endian issues on Swift code.