If the audio takes a while to load, then adding the file during runtime will cause a stall in the framerate. In this case, you would use the modified version of the director function I posted above. This is not the case for 3D models though, they can be added as usual in director functions. The call to pythoncom.CoInitialize() is only necessary for COM/DirectX related objects.
|