blob: c906f31134cb0acd5a9779d9dc8c2f0c2e12fc06 (
plain)
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
|
import simpl.base as base
import numpy as np
class TestFrame(object):
def test_buffers(self):
N = 256
f = base.Frame(N)
assert f.size == N
a = np.random.rand(N)
f.audio = a
assert np.all(f.audio == a)
a = np.random.rand(N)
f.synth = a
assert np.all(f.synth == a)
a = np.random.rand(N)
f.residual = a
assert np.all(f.residual == a)
a = np.random.rand(N)
f.synth_residual = a
assert np.all(f.synth_residual == a)
|