From 7cd6bd19ba689f7054c1205df8207243cf753542 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 15 Apr 2013 14:29:22 -0500 Subject: [PATCH] tests/api/examples.py: remove old FixedInputProcessor --- tests/api/examples.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/tests/api/examples.py b/tests/api/examples.py index 747c197..2c69222 100644 --- a/tests/api/examples.py +++ b/tests/api/examples.py @@ -24,36 +24,3 @@ class Gain(Processor): def process(self, frames, eod=False): return numpy.multiply(frames, self.gain), eod - - -class FixedInputProcessor(Processor): - """Processor which does absolutely nothing except illustrating the use - of the FixedInputSizeAdapter. It also tests things a bit.""" - - implements(IProcessor) - - BUFFER_SIZE = 1024 - - @staticmethod - @interfacedoc - def id(): - return "test_fixed" - - @interfacedoc - def setup(self, channels, samplerate, nframes): - super(FixedInputProcessor, self).setup(channels, samplerate, nframes) - self.adapter = FixedSizeInputAdapter(self.BUFFER_SIZE, channels, pad=True) - - @interfacedoc - def process(self, frames, eod=False): - for buffer, end in self.adapter.process(frames, eod): - # Test that the adapter is actually doing the job: - if len(buffer) != self.BUFFER_SIZE: - raise Exception("Bad buffer size from adapter") - - return frames, eod - - - - - -- 2.39.5