This script reads /tmp/input.wav and writes the copy of input as /tmp/output.wav.
$ swift main.swiftThis script reads /tmp/input.wav and writes the copy of input as /tmp/output.wav.
$ swift main.swift| // | |
| // DZUtility.h | |
| // Utility | |
| // | |
| // Created by Darren Zheng on 13-4-20. | |
| // Copyright (c) 2013年 Darren Zheng. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleShortVersionString</key> | |
| <string>1.0</string> | |
| <key>CFBundleIdentifier</key> | |
| <string>com.YourName.YourAppName</string> | |
| <key>CFBundleVersion</key> | |
| <string>1</string> |
| /** | |
| Calculate initial compass bearing between two locations | |
| - parameter fromLocation: Source Location | |
| - parameter toLocation: Destination Location | |
| - returns: bearing (CLLocationDirection) | |
| */ | |
| private func bearingFromLocation(fromLocation: CLLocation, toLocation: CLLocation) -> CLLocationDirection { | |