change overlap, stride in adapter config from samples to offsets
AdapterConfig
previously accepted overlap
and stride
in terms of samples, now it is changed to offsets
, so that we can support different sample rates on different pads. One example is the FrameWriter
.
One can convert samples or duration to offsets simply by using the tools in the Offset
class.
I chose offsets instead of duration because the Correlate
element requires padding of filter_length - 1 samples, and sometimes that doesn't map to integer nanoseconds.
One option we can choose is to allow one AdapterConfig
per pad, but I think that will give users the impression that the streaming behavior can be different pad by pad, which defeats the purpose of using the _TSTransSink
base class, whose job is to synchronize pads.
Another option is we can let the user either input offsets or duration, but that also might lead to some confusion(?)