From 36f527a9c0ca708edd12b3dbef90c47f91a16e57 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 4 Dec 2010 10:42:49 -0800 Subject: [PATCH] add a __repr__... get a larger block... if we don't the PS3 has trouble buffering.. probably too much python overhead handling the small block size.. [git-p4: depot-paths = "//depot/": change = 1576] --- audioraw.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/audioraw.py b/audioraw.py index db53adb..0ce76fd 100644 --- a/audioraw.py +++ b/audioraw.py @@ -50,6 +50,9 @@ class DecoderProducer: consumer.registerProducer(self, False) self.resumeProducing() + def __repr__(self): + return '' % (`self.decoder`, self.tbytes, self.skipbytes) + def pauseProducing(self): # XXX - bug in Twisted 8.2.0 on pipelined requests this is # called: http://twistedmatrix.com/trac/ticket/3919 @@ -57,7 +60,7 @@ class DecoderProducer: def resumeProducing(self): #print 'DPrP', `self` - r = self.decoder.read(oneblk=True) + r = self.decoder.read(256*1024) if r: #print 'DPrP:', len(r) if self.skipbytes: