Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_code.py

    rbf54364 r1164fd85  
    7575        'onset': '1',
    7676        'pitch': '1',
    77         'notes': '3',
    7877        'wavetable': 'self->hop_size',
    7978        'sampler': 'self->hop_size',
     
    8382        'filterbank': 'self->n_filters',
    8483        'tss': 'self->hop_size',
    85         }
    86 
    87 objinputsize = {
    88         'mfcc': 'self->buf_size / 2 + 1',
    89         'notes': 'self->hop_size',
    90         'onset': 'self->hop_size',
    91         'pitch': 'self->hop_size',
    92         'sampler': 'self->hop_size',
    93         'specdesc': 'self->buf_size / 2 + 1',
    94         'tempo': 'self->hop_size',
    95         'wavetable': 'self->hop_size',
    9684        }
    9785
     
    389377        return NULL;
    390378    }}""".format(input_param, pytoaubio = pytoaubio_fn[input_param['type']])
    391         if self.shortname in objinputsize:
    392             out += """
    393 
    394     if (self->{0[name]}.length != {expected_size}) {{
    395         PyErr_Format (PyExc_ValueError,
    396             "input size of {shortname} should be %d, not %d",
    397             {expected_size}, self->{0[name]}.length);
    398         return NULL;
    399     }}""".format(input_param, expected_size = objinputsize[self.shortname], **self.__dict__)
    400         else:
    401             out += """
     379        out += """
    402380
    403381    // TODO: check input sizes"""
Note: See TracChangeset for help on using the changeset viewer.