Skip to content

Commit

Permalink
add 'online' option to single-mode
Browse files Browse the repository at this point in the history
fixes #246
  • Loading branch information
Sebastian Böck committed Feb 13, 2017
1 parent a2f9ac9 commit bceab16
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion madmom/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ def process_single(processor, infile, outfile, **kwargs):
"""
# pylint: disable=unused-argument
# adjust origin in online mode
if kwargs.get('online'):
kwargs['origin'] = 'online'
kwargs['reset'] = False
# process the input file
_process((processor, infile, outfile, kwargs))

Expand Down Expand Up @@ -808,7 +812,10 @@ def io_arguments(parser, output_suffix='.txt', pickle=True, online=False):
default=output, help='output file [default: STDOUT]')
sp.add_argument('-j', dest='num_threads', type=int, default=mp.cpu_count(),
help='number of threads [default=%(default)s]')
sp.set_defaults(online=None)
# add arguments needed for loading processors
if online:
sp.add_argument('--online', action='store_true', default=None,
help='use online settings [default: offline]')

# batch file processing options
sp = sub_parsers.add_parser('batch', help='batch file processing')
Expand Down

0 comments on commit bceab16

Please sign in to comment.