Hello, I'm a bit of a python newby. I want to play and record sound simultaneously. SWMixer seems able to do this but the examples use WAV files. I'm trying to play a test tone. Can anyone give me a steer as to why this fails?
import sys import swmixer import numpy swmixer.init(samplerate=44100, chunksize=1024, stereo=False, microphone=True) #snd = swmixer.Sound("test1.wav") time = 1 freq = 440 time = numpy.linspace(0,1,44100*time) # 44100 numbers between 0 and 1 tone_data = numpy.sin(time*2*numpy.pi*freq) # A above Middle C snd = swmixer.Sound(tone_data) snd.play(loops=-1) I know this may be in a little at the deep end for someone who has just started to learn python, but I find I learn a lot faster if I try to do something that is useful. Pete -- http://www.petezilla.co.uk -- http://mail.python.org/mailman/listinfo/python-list