Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
Rejoice! You can now unlink your addon sounds and game sounds again.
PlaySoundFile() and PlaySound() have been updated to accept an optional second argument, allowing addon authors to designate which sound bus/channel to play the sound on. If the optional second argument is omitted, the functions behave as normal (current behavior).
PlaySound("sound" [, "channel"])
PlaySoundFile("sound" [, "channel"])
"channel" is a string with the following possible values. Using "Master" will ignore other sound levels.
But yeah, pretty much. PlaySoundFile can also be used for non-custom sounds.
I've already updated DBM with this change. thanks for heads up! Alpha version right now, i'll try to get a curse version tagged very soon once some other stuff is wrapped up :)
Edited by Omegal on 2/13/2011 12:15 AM PST
Forgive me if I'm misunderstanding something. For the general user, if we want just addon sounds running now, with little or nothing else, for example, which sound level are we keeping on?
Is that up to the addon author's discretion? Or does the general user not have to touch anything? (ie, with master, and the 3 sounds turned to 0, can we still hear addon sounds?)
by default it'll use sfx volume with no optional parameter. If sound effects are turned off so are addons sounds.
The big key to "Master" isn't to use a diff volume (although it's nice, so addon sounds can be louder than spell effect noises). The advantage is to stlll have addon sounds when effects are turned off completely :) Sound itself still has to be enabled though using master channel. but you can have ambiant, music and effects all turned off with addon sounds still being available. Very useful for tabbing out to watch a video, but wanting to still get that addon sound for a whisper or readycheck. Or having DBM, bigwigs, raidwatch, etc able to give you audible warnings if you turned everything else off.
This is something addons have to be updated for. Care must also be used by authors if they wish to maintain CN compatbility because they may have to use an if/else rule in their playsound function to use it with optional arg on 4.0.6+ but not on older, so it doesn't throw up "wtf" errors on CN wow when it doesn't understand the optional arg. Some users may have also gotten used to way 4.0 has been since it's been several months, so they may not like it going back to mastery. For this reason i also added an option to choose whether addon goes back to pre 4.0 method or stays with current SFX method. I get feeling most will have Master as preference though as that's how addons worked up until 3.3.5.
Edited by Omegal on 2/14/2011 12:17 PM PST
I was running w/o sound last night and without the optional parameter, PlaySoundFile still played and I was able to hear it. So if it's defaulting to SFX than that overrides game sound. It might be that the parameter allows you to pick which sound volume you want it regardless it'll play when you have sound off (e.g. ctrl-s).
see my tests showed opposite. If i do not use "Master" parameter, and turn off sound effects checkbox, my addon no longer makes any sound at all using PlaySoundFile.
do this test
turn off sound effects
/script PlaySoundFile("Sound\\Creature\\Illidan\\BLACK_Illidan_04.wav", "Master")
Edited by Omegal on 2/14/2011 12:22 PM PST
Might be with how sound gets turned off/on. I only use the shortcut "CTRL-S". I don't even know what that turns on/off.
That turns off Sound Effects, not the master sound.
A few things:
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.