4.0.6 change to PlaySoundFile() & PlaySound()

90 Gnome Mage
4810
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.
    "SFX"
    "Music"
    "Ambience"
    "Master"
Reply Quote
85 Night Elf Rogue
7155
Oh my god!

Tramapoline!
Trambopoline!

Good news :)
Edited by Real on 2/12/2011 11:22 AM PST
Reply Quote
85 Night Elf Druid
8765
What's the difference between PlaySound, and PlaySoundFile? Is PlaySound for default Blizzard sounds, and PlaySoundFile for custom ones?
Reply Quote
100 Gnome Mage
6215
02/12/2011 12:28 PMPosted by Fse
What's the difference between PlaySound, and PlaySoundFile? Is PlaySound for default Blizzard sounds, and PlaySoundFile for custom ones?


http://www.wowpedia.org/API_PlaySound
http://www.wowpedia.org/API_PlaySoundFile

But yeah, pretty much. PlaySoundFile can also be used for non-custom sounds.
Reply Quote
- Technical Support
100 Human Warrior
20315
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
Reply Quote
90 Gnome Mage
4810
(Bump)

Let's keep this on the front page, so authors can make their changes. :)
Reply Quote
02/13/2011 3:20 PMPosted by Tseerah
(Bump)
Reply Quote
- Technical Support
100 Human Warrior
20315
authors are pretty communitive, i'm sure most will make the updates soon enough. just watching svn logs on irc they will see other authors do it and be reminded quite a bit :P
Reply Quote
85 Troll Priest
13915
It looks like PlaySoundFile("Sound\\interface\\ReadyCheck.wav") played at a "loud" volume last night for me. Gonna have to test this out with the parameters.
Reply Quote
90 Human Paladin
10440
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?)
Reply Quote
- Technical Support
100 Human Warrior
20315
@trex

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
Reply Quote
85 Troll Priest
13915
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).
Reply Quote
- Technical Support
100 Human Warrior
20315
02/14/2011 12:14 PMPosted by Ackis
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).


really?

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

then

/script PlaySoundFile("Sound\\Creature\\Illidan\\BLACK_Illidan_04.wav")

now do

/script PlaySoundFile("Sound\\Creature\\Illidan\\BLACK_Illidan_04.wav", "Master")
Edited by Omegal on 2/14/2011 12:22 PM PST
Reply Quote
85 Troll Priest
13915
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.

I'm not at a WoW machine now so can't test anything (until tonight).
Reply Quote
85 Human Warlock
9800
now if only boss mods: text-to-speech gets updated ... =)
Reply Quote
90 Undead Mage
12345
so is there any working addon that allows me to play boss emotes?
Reply Quote
90 Undead Mage
12345
http://www.wowinterface.com/downloads/info18781-MutedSounds-combatonly.html#info

Found this
Reply Quote
85 Night Elf Druid
11510
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.

I'm not at a WoW machine now so can't test anything (until tonight).


That turns off Sound Effects, not the master sound.
Reply Quote
85 Human Paladin
5455
this is fail the auther of the addon has to make the switch i want a more advanced sound option list so i can turn all this crap off and only hear my addon
Reply Quote
05/18/2011 03:29 AMPosted by Hôlykill
this is fail the auther of the addon has to make the switch i want a more advanced sound option list so i can turn all this crap off and only hear my addon
A few things:
  • Calling things fail will only make people less likely to help you.
  • AddOn authors are volunteer workers. They have no obligation to update their AddOns, they simply do so as a favour to the users.
  • You managed to go on a rant about the author not updating the AddOn, but not once did you mention which Author/AddOn you're talking about.
  • Reply Quote

    Please report any Code of Conduct violations, including:

    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.

    Forums Code of Conduct

    Report Post # written by

    Reason
    Explain (256 characters max)
    Submit Cancel

    Reported!

    [Close]