Playing sounds at unique volume levels (theory)
Two API: PlayMusic() StopMusic()
Using the "music" track for addon sounds? i.e. set all to 25% and this to 100% to distinct certain events. Prototype: lua Code:
Using PlaySoundFile2("1.mp3", 0.5) will store the sound, len and volume int othe frame and Show it. The onShow will from there set the music volume cvar, stop the last sound and play the current one. The OnUpdate will handle stopping the music when the sound expires, clear the temp variables and hide the frame to avoid OnUpdate performance instability. The only problem is the GetSoundFileLength part as the game has no way of knowing how long a sound is, but for things like announcements one could run the game where sound effects and such are on 25% while the music is at 100% (and turn off the in-game music so it does not bother you). Now when a sound is played on the music channel it's louder than any other sound. Only instability is that it loops if not stopped (it is in this addon) and that it can not play multiple music files at once so it's pointless for anything but announcements that do not occur too often -perhaps something Bossmods should incorporate. :) |
Is this suggested as a workaround for the current bug with PlaySound()-volume not being independent from the Sound-volume setting (as prior to 4.0.1)?
|
unless you need to dynamically change the volume of what you are playing in-gem, wouldn't it just be easier to change the volume of the sound recording its self at this point?
|
Quote:
Fixes the problem when in-game sounds are too loud but you wish to hear for example boss talk -one could make a mod to play the boss voices over this channel instead (they usually don't play more than one sound at a time -PlayMusic would have problems playing multiple files at once too). |
All times are GMT -6. The time now is 03:13 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI