forked from AudioKit/AudioKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAKDynaRageCompressorTests.swift
61 lines (50 loc) · 1.7 KB
/
AKDynaRageCompressorTests.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
60
61
//
// AKDynaRangeCompressorTests.swift
// AudioKitTestSuite
//
// Created by Aurelius Prochazka, revision history on GitHub.
// Copyright © 2018 AudioKit. All rights reserved.
//
import AudioKit
import XCTest
class AKDynaRangeCompressorTests: AKTestCase {
override func setUp() {
super.setUp()
// Need to have a longer test duration to allow for envelope to progress
duration = 1.0
input.rampDuration = 0.0
input.amplitude = 0.1
}
func testAttackTime() {
output = AKDynaRageCompressor(input, ratio: 10, attackTime: 21)
AKTestMD5("27de5d9f687d6c114126e2e243b22a25")
}
func testDefault() {
output = AKDynaRageCompressor(input)
AKTestMD5("0ae621119d307784c6c9daa2be88115c")
}
func testParameters() {
output = AKDynaRageCompressor(input,
ratio: 10,
threshold: -1,
attackTime: 21,
releaseTime: 22)
AKTestMD5("746a16c29c92b779e3b6e05d636cdf53")
}
func testRage() {
output = AKDynaRageCompressor(input, ratio: 10, rage: 10)
AKTestMD5("d86e371b09429c9636ffdb260958e35b")
}
func testRatio() {
output = AKDynaRageCompressor(input, ratio: 10)
AKTestMD5("d86e371b09429c9636ffdb260958e35b")
}
func testReleaseTime() {
output = AKDynaRageCompressor(input, ratio: 10, releaseTime: 22)
AKTestMD5("00ad8e2278e31838555163547d9cac9c")
}
func testThreshold() {
output = AKDynaRageCompressor(input, ratio: 10, threshold: -1)
AKTestMD5("85583edfafd159d2955f6a2d51481bee")
}
}