py2exe of pyglet No suitable audio driver could be loaded.

44 views
Skip to first unread message

hagna

unread,
Mar 3, 2008, 4:44:41 PM3/3/08
to pyglet-users
Using py2exe on the following code doesn't yield a working exe.

from pyglet import media
from pyglet.media import procedural


player = media.Player()
player.queue(media.StaticSource(procedural.Sine(2, 1000)))
player.queue(media.StaticSource(procedural.Sine(10, 500)))
player.queue(media.StaticSource(procedural.WhiteNoise(5)))
player.eos_action = player.EOS_NEXT
player.play()
while player.source:
player.dispatch_events()


We get the following error even though the python sound.py plays
sounds just fine.


C:\Documents and Settings\Administrator\My Documents
\py2exe2\dist>sound.exe
Traceback (most recent call last):
File "sound.py", line 1, in <module>
File "pyglet\media\__init__.pyc", line 1219, in <module>
ImportError: No suitable audio driver could be loaded.



hagna

unread,
Mar 3, 2008, 6:26:55 PM3/3/08
to pyglet-users
The solution from mewo2 on #pyglet is "c:\Python25\python setup.py
py2exe --includes pyglet.media.drivers.directsound"
Reply all
Reply to author
Forward
0 new messages