Fix for iOS bug in setSampleFrequency

Fixes #1