Esempio n. 1
0
def test_pan_small():
    inp = {
        'rate': 42,
        'left': [4, 4, 4, 4, 4],
        'right': [6, 6, 6, 6, 6],
    }
    inp2 = copy.deepcopy(inp)
    exp = {
        'rate': 42,
        'left': [4, 3, 2, 1, 0],
        'right': [0, 1.5, 3, 4.5, 6],
    }
    compare_sounds(lab.pan(inp), exp)
    assert inp == inp2, 'be careful not to modify the input!'
Esempio n. 2
0
def test_pan_random_2():
    inps, exp = load_pickle_pair('pan_02.pickle')
    inps2 = copy.deepcopy(inps)
    compare_sounds(lab.pan(*inps), exp)
    assert inps == inps2, 'be careful not to modify the input!'
Esempio n. 3
0
def test_pan_real():
    inp = lab.load_wav(os.path.join(TEST_DIRECTORY, 'sounds', 'mystery.wav'))
    inp2 = copy.deepcopy(inp)
    outfile = os.path.join(TEST_DIRECTORY, 'test_outputs', 'mystery_pan.wav')
    compare_against_file(lab.pan(inp), outfile)
    assert inp == inp2, 'be careful not to modify the input!'