fix 10.3 audio

This commit is contained in:
Damien Elmes 2009-03-13 07:06:21 +09:00
parent 38cfd6e7db
commit 95447a23ec

View file

@ -146,10 +146,9 @@ try:
PYAU_CHANNELS = 1
PYAU_RATE = 44100
PYAU_INPUT_INDEX = 0
except ImportError:
except:
pass
class _Recorder(object):
def postprocess(self):
@ -173,7 +172,10 @@ class PyAudioThreadedRecorder(threading.Thread):
def run(self):
chunk = 1024
p = pyaudio.PyAudio()
try:
p = pyaudio.PyAudio()
except NameError:
raise Exception("Recording not supported on OSX10.3.")
stream = p.open(format=PYAU_FORMAT,
channels=PYAU_CHANNELS,
rate=PYAU_RATE,