[Shtoom] Mac OS X coreaudio
Hubert Pham
hubert at MIT.EDU
Sat Oct 15 21:41:50 CEST 2005
Hi,
I've had wonderful success with the current shtoom (svn head), namely
with running shtoomphone on linux. Shtoomphone registers with an
asterisk server, places and receives phone calls, and it's all
fantastic.
I would love to run shtoomphone on Mac OS X, but I'm having some
trouble with making the audio to work. Specifically, when I run:
% python2.4 shtoomphone.py
I see:
app is <shtoom.app.phone.Phone instance at 0x593d00>
NAT pref sez both
audioPref is None
Installing coreaudio callback
Device name: Built-in Audio
Running: 0
Sample rate: 44100.0
Buffer frame size: 512
Output stream description:
Sample rate: 44100.0
Format ID: 1819304813
Format flags: 11
Bytes per packet: 8
Bytes per frame: 8
Channels per frame: 2
Bits per channel: 32
done.
Exception exceptions.TypeError: 'callback() takes exactly 2 arguments
(1 given)' in 'coreaudio.audioDeviceIOCallback' ignored
Exception exceptions.TypeError: 'callback() takes exactly 2 arguments
(1 given)' in 'coreaudio.audioDeviceIOCallback' ignored
...ad infinitum (but nothing else happens)
I should note that I very recently installed Donovan Preston's pyx
coreaudio module from:
http://soundfarmer.com/content/code/coreaudio/
and I was able to get his test program to work (catest.py), so I'm
confident that the coreaudio module is installed properly.
However, I noticed that in shtoom/audio/osxaudio.py, on line 123, the
declaration for the 'callback' method takes in two parameters:
def callback(self, buffer)
...so my guess is Python is complaining because Donovan's pyx
coreaudio module calls the 'callback' method with only one parameter
(namely, just 'self'). It's not clear to me that the pyx coreaudio
code I downloaded has an audio input interface, but Shtoom's callback
() method (with the 'buffer' parameter) seems to suggest otherwise.
Perhaps I have an 'outdated' version of pyx coreaudio?
Many thanks!
hubert
More information about the Shtoom
mailing list