Skip to content
Snippets Groups Projects
Commit 4744ed53 authored by Cody Messick's avatar Cody Messick
Browse files

Fixed bug where vetoes only applied on interger second intervals

datasource.py: Added rate kwarg to mksegmentsrcgate
multirate_datasource.py: Pass max rate to mksegmentsrcgate
parent e95379d7
No related branches found
No related tags found
No related merge requests found
......@@ -707,13 +707,13 @@ def append_options(parser):
# @enddot
#
#
def mksegmentsrcgate(pipeline, src, segment_list, invert_output = False, **kwargs):
def mksegmentsrcgate(pipeline, src, segment_list, invert_output = False, rate = 1, **kwargs):
"""!
Takes a segment list and produces a gate driven by it. Hook up your own input and output.
@param kwargs passed through to pipeparts.mkgate(), e.g., used to set the gate's name.
"""
return pipeparts.mkgate(pipeline, src, threshold = 1, control = pipeparts.mksegmentsrc(pipeline, segment_list, invert_output = invert_output), **kwargs)
return pipeparts.mkgate(pipeline, src, threshold = 1, control = pipeparts.mkcapsfilter(pipeline, pipeparts.mksegmentsrc(pipeline, segment_list, invert_output = invert_output), caps = "audio/x-raw, rate=%d" % rate), **kwargs)
##
......
......@@ -316,7 +316,7 @@ def mkwhitened_multirate_src(pipeline, src, rates, instrument, psd = None, psd_f
#
if veto_segments is not None:
head = datasource.mksegmentsrcgate(pipeline, head, veto_segments, invert_output=True)
head = datasource.mksegmentsrcgate(pipeline, head, veto_segments, invert_output=True, rate = max(rates))
#
# optional gate on whitened h(t) amplitude. attack and hold are
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment