Changes in / [0d63b5f:f9ed504]
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-filterbank.c
r0d63b5f rf9ed504 95 95 if (self->vec.length != self->win_s / 2 + 1) { 96 96 PyErr_Format(PyExc_ValueError, 97 "input cvec has length %d, but f ilterbankexpects length %d",97 "input cvec has length %d, but fft expects length %d", 98 98 self->vec.length, self->win_s / 2 + 1); 99 99 return NULL; … … 140 140 if (err > 0) { 141 141 PyErr_SetString (PyExc_ValueError, 142 "error when running set_triangle_bands");142 "error when setting filter to A-weighting"); 143 143 return NULL; 144 144 } … … 159 159 if (err > 0) { 160 160 PyErr_SetString (PyExc_ValueError, 161 "error when running set_mel_coeffs_slaney");161 "error when setting filter to A-weighting"); 162 162 return NULL; 163 163 } -
python/lib/aubio/cmd.py
r0d63b5f rf9ed504 500 500 def main(): 501 501 parser = aubio_parser() 502 if sys.version_info[0] != 3: 503 # on py2, create a dummy ArgumentParser to workaround the 504 # optional subcommand issue. See https://bugs.python.org/issue9253 505 # This ensures that: 506 # - version string is shown when only '-V' is passed 507 # - help is printed if '-V' is passed with any other argument 508 # - any other argument get forwarded to the real parser 509 parser_root = argparse.ArgumentParser(add_help=False) 510 parser_root.add_argument('-V', '--version', help="show version", 511 action="store_true", dest="show_version") 512 args, extras = parser_root.parse_known_args() 513 if args.show_version == False: # no -V, forward to parser 514 args = parser.parse_args(extras, namespace=args) 515 elif len(extras) != 0: # -V with other arguments, print help 516 parser.print_help() 517 sys.exit(1) 518 else: # in py3, we can simply use parser directly 519 args = parser.parse_args() 502 args = parser.parse_args() 520 503 if 'show_version' in args and args.show_version: 521 504 sys.stdout.write('aubio version ' + aubio.version + '\n') -
python/tests/test_aubio_cmd.py
r0d63b5f rf9ed504 20 20 21 21 def test_samples2seconds(self): 22 self.assertEqual(aubio.cmd.samples2seconds(3200, 32000), 23 "0.100000\t") 22 self.assertEqual(aubio.cmd.samples2seconds(3200, 32000), "0.100000\t") 24 23 25 24 def test_samples2milliseconds(self): 26 self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000), 27 "100.000000\t") 25 self.assertEqual(aubio.cmd.samples2milliseconds(3200, 32000), "100.000000\t") 28 26 29 27 def test_samples2samples(self): 30 self.assertEqual(aubio.cmd.samples2samples(3200, 32000), 31 "3200\t") 28 self.assertEqual(aubio.cmd.samples2samples(3200, 32000), "3200\t") 32 29 33 30 if __name__ == '__main__': -
src/spectral/phasevoc.c
r0d63b5f rf9ed504 213 213 synthold[i] += synth[i + pv->hop_s] * pv->scale; 214 214 } 215 216 uint_t aubio_pvoc_get_win(aubio_pvoc_t* pv)217 {218 return pv->win_s;219 }220 221 uint_t aubio_pvoc_get_hop(aubio_pvoc_t* pv)222 {223 return pv->hop_s;224 } -
src/spectral/phasevoc.h
r0d63b5f rf9ed504 89 89 */ 90 90 uint_t aubio_pvoc_get_win(aubio_pvoc_t* pv); 91 92 91 /** get hop size 93 92
Note: See TracChangeset
for help on using the changeset viewer.