Changeset 7e114c8


Ignore:
Timestamp:
Sep 30, 2009, 1:24:56 AM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
1cc007c
Parents:
f11d78d
Message:

tests/python/src/temporal/a_weighting.py: moved from adesign.py

File:
1 moved

Legend:

Unmodified
Added
Removed
  • tests/python/src/temporal/a_weighting.py

    rf11d78d r7e114c8  
    1 from template import aubio_unit_template
    2 from aubio.aubiowrapper import *
     1from localaubio import *
    32
    43samplerate = 44100
     
    98
    109  def setUp(self):
    11     self.o = new_aubio_adsgn_filter(samplerate, channels)
     10    self.o = new_aubio_filter_a_weighting (samplerate, channels)
    1211
    1312  def tearDown(self):
    14     del_aubio_adsgn_filter(self.o)
     13    del_aubio_filter (self.o)
    1514
    1615  def test_creation(self):
     
    2019    """ check filter run on a vector full of zeroes returns zeros """
    2120    vec = new_fvec(buf_size, channels)
    22     aubio_adsgn_filter_do(self.o, vec)
     21    aubio_filter_do (self.o, vec)
    2322    for index in range(buf_size):
    2423      for channel in range(channels):
     
    3130      for channel in range(channels):
    3231        fvec_write_sample(vec, 1., channel, index)
    33     aubio_adsgn_filter_do(self.o, vec)
     32    aubio_filter_do (self.o, vec)
    3433    for index in range(buf_size):
    3534      for channel in range(channels):
     
    4140    for index in range(buf_size):
    4241      for channel in range(channels):
    43         fvec_write_sample(vec, 1.e-37, channel, index)
    44     aubio_adsgn_filter_do(self.o, vec)
     42        fvec_write_sample(vec, 2.e-42, channel, index)
     43    aubio_filter_do (self.o, vec)
    4544    for index in range(buf_size):
    4645      for channel in range(channels):
     
    4948
    5049if __name__ == '__main__':
     50  import unittest
    5151  unittest.main()
Note: See TracChangeset for help on using the changeset viewer.