pygame.mixer.music not playing
Marian Aldenhövel
marian at mba-software.de
Mon Feb 7 00:24:52 EST 2005
Hi,
> Also you can try and look for another sound package, like maybe pyFMOD
I have looked at it. While I do not like some of the boasting on the FMOD
site it does seem very suitable.
FMOD is cross-platform but pyFMOD is available only as Win32-Setup. Does
that mean it cannot be made to work on Linux or is it just not packaged
for it? It looks like your standard DLL-Import-File as known from other
languages and uses ctypes (had to install that first). How hard can it be
to make a version that loads a shared library with the same API on Linux?
To make pyFMOD work with the current version of FMOD I had to fix it in a
few obvious places. After doing so the new version of my micro-program
looks like this:
import time
from pyFMOD import *
res = FSOUND_Init(44100, 32, 0)
print "FSOUND_Init() =", res
stream = FSOUND_Stream_Open("file1.mp3",0,0,0)
print "FSOUND_Stream_Open() =", stream
res = FSOUND_Stream_Play(FSOUND_FREE,stream)
print "FSOUND_Stream_Play() =", res
while True:
print "FSOUND_Stream_GetTime() =", FSOUND_Stream_GetTime(stream)
time.sleep(1)
And plays fine. Now I need to read up on FMODs API to find out how to
eliminate the "while True;" but that should not be a problem. This would give
me a very rich API with full control.
I am having fun! Thank you all.
Ciao, MM
--
Marian Aldenhövel, Rosenhain 23, 53123 Bonn. +49 228 624013.
http://www.marian-aldenhoevel.de
"Wir brauchen keine Opposition, wir sind bereits Demokraten."
More information about the Python-list
mailing list