I found some problems with the new audio: In windows xp, a small script that don't uses audio:
D:\pcode\cocos coloLayer>test_3rects.py Traceback (most recent call last): File "D:\pcode\cocos coloLayer\test_3rects.py", line 10, in <module> director.init( resizable=True ) File "D:\cocos_pristine\cocos_dev\cocos_released\cocos\director.py", line 342, in init raise NoAudioError(msg) cocos.audio.exceptions.NoAudioError: cocos.audio isn't able to work without need ed dependencies. Try installing pygame for fixing it, or forcing no audio mode b y calling director.init with audio=None, or setting the COCOS2D_NOSOUND=1 variab le in your env. There is a report with other audio problem in linux (issue 140) The old docs and all the apps that people can look for guidance are in terms of pyglet audio Maybe we should add the kwarg pyglet_audio=True in the call to director.init() at least for the short term(pyweek)? And try to load the relevant subsytem ? Is this feasible Daniel ? (ie not too complicate) A first peek to the problem in win xp: The problem is that ctypes cant find some dll's. Copying from site-packages/pygame to the failing script directory the following dlls libogg-0.dll libvorbis-0.dll libvorbisfile-3.dll SDL.dll SDL_image.dll SDL_mixer.dll smpeg.dll allows the script to run. I think the problem is the use of ctypes.util.find_library: a quick look at python docs 2.6 tells: """ On Windows, find_library searches along the system search path, and returns the full pathname""" For windows XP, that means current working directory, then windows/system32. Anyway, the standart pygame installer puts the dlls in site-packages\pygame , so ctypes cannot find the libraries. A quick run in the python 2.6 interpreter: >>> ctypes.WinDLL(r'c:\python26\Lib\site-packages\pygame\SDL.dll') <WinDLL 'c:\python26\Lib\site-packages\pygame\SDL.dll', handle 6a740000 at b34f70> meaning it is possible to load from a specific path A possible fix for windows xp can be: 1. include the dlls in cocos\dlls 2. load the libs with ctypes.WinDLL , not find_library Windows vista or win7 can have additional problems ( manifests ?). At the moment I don't have access to those OS. Clearly more experimentation is needed. -- claudio -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.
