view test/test_process.py @ 66:f0e2a8421797

Handle getRemainingFeatures as well, and return dict only if >1 output (i.e. treat default case and explicit request of 1 output similarly)
author Chris Cannam
date Wed, 14 Jan 2015 11:55:20 +0000
parents c5106210370e
children e15e684d2af4
line wrap: on
line source

import vamp
import numpy as np

testPluginKey = "vamp-test-plugin:vamp-test-plugin"
testPluginKeyFreq = "vamp-test-plugin:vamp-test-plugin-freq"

rate = 44100

def test_process():
    buf = np.zeros(10240)
    results = vamp.process(buf, rate, testPluginKey, {}, [ "input-timestamp" ])
    print("results = " + str(list(results)))
    return True

def test_process_freq():
    buf = np.zeros(10240)
    results = vamp.process(buf, rate, testPluginKeyFreq, {}, [ "input-timestamp" ])
    print("results = " + str(list(results)))
    return True