Sound API...?
-
Chris, I saw a post from you mentioning a sound API... what exactly would this let us do, aside from uploading sounds along with models? Will sounds stop playing at the end of the simulation? Will we be able to overlap sounds on windows? I'd really like to have a way to play looping engine sounds that are modified dynamically, speeding up/slowing down as a variable changes.
-
only way to do anything like that now is something like
if slider("motor")<=0.1 then playsound("motor1.wav");elsif 0.1<= slider("motor")<=0.5 then playsound("motor2.wav");elsif slider("motor")>=0.5 then playsound("motor3.wav");end;
I haven't tested it yet, but it should work. Oh, and motor,1,2,and 3 don't actually get higher pitched, that's just an example of the code. If you wanted them to speed up, you'd have to put each part in another onTick field with different framerates.
-
I think that you would need to edit the file AND on top of that, wait for embedded sound to work, then you would be able to do something like that. But who can wait?
-
@wacov said:
Chris, I saw a post from you mentioning a sound API... what exactly would this let us do, aside from uploading sounds along with models? Will sounds stop playing at the end of the simulation? Will we be able to overlap sounds on windows? I'd really like to have a way to play looping engine sounds that are modified dynamically, speeding up/slowing down as a variable changes.
It would fix most of the bugs on the Windows side. It will allow overlap and probaby stopping the sound at the end. I dont know about a variable looping sound but I will look into it.
Advertisement