forked from AudioKit/AudioKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelayTests.swift
59 lines (50 loc) · 1.5 KB
/
delayTests.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// delayTests.swift
// AudioKit
//
// Created by Aurelius Prochazka, revision history on GitHub.
// Copyright © 2018 AudioKit. All rights reserved.
//
import AudioKit
import XCTest
class DelayTests: AKTestCase {
override func setUp() {
super.setUp()
duration = 5.0
}
func testDefault() {
output = AKOperationEffect(input) { input, _ in
return input.delay()
}
AKTestMD5("e1f204032e3e37c75551f9bd6bc53e89")
}
func testFeedback() {
output = AKOperationEffect(input) { input, _ in
return input.delay(feedback: 0.99)
}
AKTestMD5("5422eea539cebf3530b7b4f665214cce")
}
func testParameters() {
output = AKOperationEffect(input) { input, _ in
return input.delay(time: 0.01, feedback: 0.99)
}
AKTestMD5("34c508d5ce57651024935660f7e3c877")
}
// func testParameterSweep() {
// output = AKOperationEffect(input) { input, _ in
// let ramp = AKOperation.lineSegment(
// trigger: AKOperation.metronome(frequency: 1.0 / self.duration),
// start: 0,
// end: 0.99,
// duration: self.duration)
// return input.delay(time: 0.01, feedback: 0.99 - ramp)
// }
// AKTestMD5("")
// }
func testTime() {
output = AKOperationEffect(input) { input, _ in
return input.delay(time: 0.01)
}
AKTestMD5("102a6ed78dc39aec1a209302008800ef")
}
}