better hourly
[scannr.git] / snd.py
blob:a/snd.py -> blob:b/snd.py
--- a/snd.py
+++ b/snd.py
@@ -94,7 +94,11 @@
 
     while 1:
         try:
-            data = stream.read(CHUNK_SIZE)
+            data = stream.read(CHUNK_SIZE) # Fewer than n bytes may be returned if the operating system call returns fewer than n bytes.
+	    #if len(data) < 4096:
+		#print "cropped packet detected! " + len(data)
+		#data.extend('\x00' * CHUNK_SIZE - len(data))
+		#print "fixed to " + len(data)
         except IOError as ex:
             if ex[1] != pyaudio.paInputOverflowed:
                 raise