Mercurial > code > home > repos > light9
view flax/Ports.py @ 326:a3267d8c498e
leave in a comment about how to offset the audio time in case your sound card is lying
we didn't eventually need this because we found a good-sounding card
that could report offset correctly. But if you're stuck with a card
that reports offset incorrectly, you can play with this offset for
a partial workaround. note that song intros will probably still be
corrupted (but you could workaround that by prepending some silence)
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sun, 18 Jun 2006 22:01:41 +0000 |
parents | 45b12307c695 |
children |
line wrap: on
line source
# super rough code class AbstractPort: def __init__(self): pass def put_data(self, value): pass def get_data(self): pass class Port(AbstractPort): "Connects from a node to exactly one node." def __init__(self, value=None): AbstractPort.__init__(self) self.value = value def put_data(self, value): self.value = value def get_data(self): return self.value class MultiPort(AbstractPort): "Connects from a node to any number of nodes." def __init__(self, values=None): AbstractPort.__init__(self) self.values = values def put_data(self, values): self.values = values def get_data(self): return self.values