diff options
-rw-r--r-- | drums.py | 2 | ||||
-rw-r--r-- | mkiv.py | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -123,7 +123,7 @@ if options.test: print 'Current playing:', PLAYING print 'Playing:', frq data = DRUMS[frq] - PLAYING.add(SampleReader(data, len(data), 1.0)) + PLAYING.append(SampleReader(data, len(data), 1.0)) time.sleep(len(data) / (4.0 * options.rate)) print 'Done' exit() @@ -691,7 +691,10 @@ for fname in args: ivtext = ET.SubElement(ivstreams, 'stream', type='text') for tev in textstream: text = tev.ev.text - text = text.decode('utf8') + try: + text = text.decode('utf8') + except UnicodeDecodeError: + text = 'base64:' + text.encode('base64') ivev = ET.SubElement(ivtext, 'text', time=str(tev.abstime), type=type(tev.ev).__name__, text=text) ivaux = ET.SubElement(ivstreams, 'stream') |