Isolate sample conversion. This should be moved out of BpskDetector.java.