]> git.parisson.com Git - timeside.git/commitdiff
tests/api/examples.py: remove old FixedInputProcessor
authorPaul Brossier <piem@piem.org>
Mon, 15 Apr 2013 19:29:22 +0000 (14:29 -0500)
committerPaul Brossier <piem@piem.org>
Mon, 15 Apr 2013 19:29:22 +0000 (14:29 -0500)
tests/api/examples.py

index 747c197d2b70ecdc092a3de971da4376afbdde8f..2c692223d92b74a18109b4add0e150cf301ad40e 100644 (file)
@@ -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
-
-
-
-
-