View Single Post
  #1  
Old 07-26-2008, 02:36 PM
roman_suvorov roman_suvorov is offline
Member
 
Join Date: May 2008
Location: Kingston, ON, Canada
Posts: 25
Question Sound doesn't play from director functions

Hello, when running a sample script like this one:

Code:
import viz
viz.go()

def playSound():
	sound = viz.addAudio("quack.wav")
	sound.play()
	return
	
viz.director(playSound)
.. no sound is played and the following error message is displayed:

Code:

** ERROR: Failed to create graph builder (CoInitialize has not been called. )
** ERROR: Failed to load audio 'quack.wav'
However, this works fine:
Code:
import viz
viz.go()
sound = viz.addAudio("quack.wav")
sound.play()
.. so I figured this must have something to do with Vizard's handling of director functions. Any ideas?
Reply With Quote