aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drums.py2
-rw-r--r--mkiv.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/drums.py b/drums.py
index b912af5..1ee7c1e 100644
--- a/drums.py
+++ b/drums.py
@@ -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()
diff --git a/mkiv.py b/mkiv.py
index f363027..e914f8a 100644
--- a/mkiv.py
+++ b/mkiv.py
@@ -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')