forked from AudioKit/AudioKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAKOscillatorTests.swift
58 lines (48 loc) · 1.52 KB
/
AKOscillatorTests.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
//
// AKOscillatorTests.swift
// AudioKit
//
// Created by Aurelius Prochazka, revision history on GitHub.
// Copyright © 2018 AudioKit. All rights reserved.
//
import AudioKit
import XCTest
class AKOscillatorTests: AKTestCase {
func testAmpitude() {
input = AKOscillator(waveform: AKTable(.square), amplitude: 0.5)
output = input
AKTestMD5("24c58d48adb46e273d63088f6ca30208")
}
func testDefault() {
output = input
AKTestNoEffect()
}
func testDetuningMultiplier() {
input = AKOscillator(waveform: AKTable(.square), detuningMultiplier: 0.9)
output = input
AKTestMD5("591d314b30df8d6af0b2e9df86528af1")
}
func testDetuningOffset() {
input = AKOscillator(waveform: AKTable(.square), detuningOffset: 11)
output = input
AKTestMD5("c0d0d9e1cb39611efaf0b7b8b8d7c137")
}
func testFrequency() {
input = AKOscillator(waveform: AKTable(.square), frequency: 400)
output = input
AKTestMD5("d3998b51af7f54f1c9088973b931e9af")
}
func testParametersSetAfterInit() {
input = AKOscillator(waveform: AKTable(.square))
input.rampDuration = 0.0
input.frequency = 400
input.amplitude = 0.5
output = input
AKTestMD5("615e742bc1412c15237a453c5b49d5e0")
}
func testParameters() {
input = AKOscillator(waveform: AKTable(.square), frequency: 400, amplitude: 0.5)
output = input
AKTestMD5("615e742bc1412c15237a453c5b49d5e0")
}
}