|
@@ -7,16 +7,19 @@
|
|
// 功能: 生成指定长度的空 WAV 文件
|
|
// 功能: 生成指定长度的空 WAV 文件
|
|
/*
|
|
/*
|
|
e.g.
|
|
e.g.
|
|
- let tool = LYEmptyWAV(sampleRate: 44100,
|
|
|
|
|
|
+ let tool = PQCreateEmptyWAV(sampleRate: 44100,
|
|
channel: 1,
|
|
channel: 1,
|
|
duration: 20,
|
|
duration: 20,
|
|
bit: 16);
|
|
bit: 16);
|
|
|
|
|
|
- var documentPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! as String
|
|
|
|
- documentPath.append("/test.wav")
|
|
|
|
- tool.createEmptyWAVFile(url: URL(fileURLWithPath: documentPath))
|
|
|
|
-
|
|
|
|
- 600 s 622028807.468433 622028844.650877
|
|
|
|
|
|
+ //输出文件目录
|
|
|
|
+ let outputPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! as String
|
|
|
|
+ outputPath.append("/test.wav")
|
|
|
|
+
|
|
|
|
+ //同步创建方法
|
|
|
|
+ tool.createEmptyWAVFile(url: URL(fileURLWithPath: outputPath))
|
|
|
|
+
|
|
|
|
+
|
|
*/
|
|
*/
|
|
|
|
|
|
import UIKit
|
|
import UIKit
|