I tried to run the ‘latencyFromTone.py’ file in the psychopy demo, this happened:
Traceback (most recent call last):
File "/Users/experimenter/Documents/test_code/audio_recorder_test.py", line 34, in <module>
microphone.switchOn()
File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/microphone.py", line 1146, in switchOn
sound.pyoSndServer.setSamplingRate(sampleRate)
AttributeError: 'NoneType' object has no attribute 'setSamplingRate'
You can download the file psychopy/microphone.py from there and replace it in your own, and there are two small changes to latencyFromTone.py that you need to make (that you can also see there).
At some point I’ll try to make the mic a little easier - Jeremy used to look after that but he’s been busy with other things lately.