[Tutor] wav audio playback
Isaac
hyperneato at gmail.com
Mon Feb 26 08:20:56 CET 2007
hello from a programming newbie.
I am writing a metronome function.
Currently, I am using a hack with the system bell:
[code]
def tick(rate):
while true: #do until
C-c
print '\a' #system bell inside
terminal
time.sleep(rate) #pause at desired
rate
[/code]
I would like to use any audio clip for a 'beat' of the metronome.
I have looked into pyaudio for .wav clips. I installed the binary for
pyaudio but it put the files into site-packages folder in
my python-2.4 framework directory; I copied the files to the site-packages
folder under 2.5 but when I import pyaudio at the Python 2.5 interpreter I
get:
"""
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyaudio.py:101:
RuntimeWarning: Python C API version mismatch for module _portaudio: This
Python has API version 1013, module _portaudio has version 1012.
import _portaudio as pa """
It does play sound but how can I get rid of this error? Do I have to wait
for the newer version of portaudio and/or pyaudio to be released to keep
this error from happening? Should I be concerned with this warning?
Is there another, better, sound playback module that anyone recommend I
could use?
I have mac ppc os X 10.4.8 (would like to have cross platform functionality,
eventually)
Using Python 2.5
cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070225/8aa97800/attachment.htm
More information about the Tutor
mailing list