[Pythoncard-users] bug in sound.py
by Richard Wolff other posts by this author
Apr 21 2002 10:43PM messages near this date
RE: [Pythoncard-users] what is the syntax for posting an event?
|
RE: [Pythoncard-users] bug in sound.py
In sound.py:_soundType, if the filename path has more than one period,
as in, say, c:\Python2.2\x\y\noise.wav, the function fails.
fix: change name,ext = filename.split('.')
to
ext = filename.split('.')[-1]
However, the standard python library module 'sndhdr' is a more general
approach to what _soundType is doing. Thus, the above change led me to
a more extensive rewrite. Suggested new sound.py (from
site-packages/PythonCardPrototype) and new samples/sounds/sounds.py are
attached.
Richard
Attachments:
sound.py
sounds.py
Thread:
Richard Wolff
Kevin Altis
|