Is it possible to increase and decrease the total % of volume of all sound files playing for a person?
Main gist is I've been working with some sound effects lately, and I'd like to make it so that it's louder outside than it is inside.
Any help would be really awesome. I'm a little out of touch! :-)
ID:158905
Jun 12 2009, 8:36 am
|
|
In response to Kaioken
|
|
Rhetorically speaking, say we have a file that is repeating over and over. I'm trying to make it so that upon entering a certain area, the repeating file's volume increases (or decreases). How would one go about doing that?
EDIT: Nevermind :) |
In response to Nightmare3
|
|
usr << sound('boom.wav', volume=50) // play an explosion at half volume
You can control the volume through winget and a slider bar. mob/verb/Play_Song(F as file) You could probably do it so that you can change the volume while the song is playing, but I never gave it much thought as to figure out how... |
In response to Nightmare3
|
|
You can update the same sound by sending the player a new sound with the same file and channel that the original sound had (you have to specify both a file and a channel both times), by using sound.status with the SOUND_UPDATE flag set the 2nd time (as well as whatever parameters you want to update the sound with).
You can use a new /sound object each time if you want, it just has to be with the same file and channel and have SOUND_UPDATE flagged so it updates the current sound instead of replacing it. Here's a code example: mob/verb/Play_Different_Volume(S as sound) |
In response to Howey
|
|
I actually got it working a different way. Works good, thanks for your help anyway guys. The slider info was a bit useful for future reference.
|
Note you can also play "3D sound", i.e. differently relative to the source of the sound and the player position.