different soundfiles - one soundactuator

is it possible in python to have one soundactuator to give this soundactuator during playing different soundfiles?

noon

https://blenderartists.org/forum/viewtopic.php?t=4743

apparently not

  • checks gamekit book *\

with python you can only adjust the volume ( getGain(), setGain(val) ), and the pitch ( setPitch(val), getPitch() )

(a pitch of 0.0 is the sound not playing, 1.0 is normal speed, 2.0 is double speed…)

ok, thanks

i’ve found another possibility:


import winsound 
file = "C:/my/File/Path/file.wav" 
winsound.PlaySound(file, 1) 

noon

Thats nice, but it would only work in windows, it would require a full python installation (you might be able to get away with just a copy of winsound.py), and it wouldn’t work with 3d sound. :frowning:

I haven’t looked into using the sound actuator yet, but I expected there would be a function like:

actuator.setSound(“sound1.wav”)

like there is for most of the actuators. :-?

Keith. 8)

In my case a full python installation is needed anyway. Because I’m working with an extern stroy-engine, wich runs in python.

But even thoug I would prefer it, if it would work with an actuator. But there is no function to set a soundfile with the whole path…

noon

I just got a question, If i use the sound actuator will the sound bug be fixed???
If so i have to find out about it :smiley:

what bug?

I would doubt there is any implementation to do what you want at all, like the “alpha bug” it simply is not a feature

This was discussed a very short time ago, please use the search feature before you post a question.
https://blenderartists.org/forum/viewtopic.php?t=4743