|
@@ -198,11 +198,14 @@ class PQStuckPointCuttingView: UIView {
|
|
|
/// - Returns: <#description#>
|
|
|
func configVoiceFrequency() {
|
|
|
let waveTotalCount = Int(videoDuration) / cFrequency.count
|
|
|
- let remainder = Int(ceil(videoDuration - CGFloat(waveTotalCount * cFrequency.count)))
|
|
|
+ var remainder = Int(ceil(videoDuration - CGFloat(waveTotalCount * cFrequency.count)))
|
|
|
var totalWave: [CGFloat] = Array<CGFloat>.init()
|
|
|
for _ in 0 ..< waveTotalCount {
|
|
|
totalWave = totalWave + cFrequency
|
|
|
}
|
|
|
+ if remainder > cFrequency.count - 1 {
|
|
|
+ remainder = cFrequency.count - 1
|
|
|
+ }
|
|
|
if remainder > 0 {
|
|
|
totalWave = totalWave + cFrequency[0 ... remainder]
|
|
|
}
|