Quantcast PlaySound() behavior changed in 7.3.0? - WoWInterface
Thread Tools Display Modes
06-29-17, 10:48 PM   #1
arith
A Fallenroot Satyr
 
arith's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 29
PlaySound() behavior changed in 7.3.0?

I noticed several changes in Ace3 and most of those are related to PlaySound.
For example, PlaySound("igMainMenuOptionCheckBoxOn") has been changed to PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON) in Blizzard's frame codes.
Ace3's solution is changed it to below:
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856)

Does anyone has some more details regarding to this change?
  Reply With Quote
06-29-17, 10:51 PM   #2
arith
A Fallenroot Satyr
 
arith's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 29
Found this one:
https://www.townlong-yak.com/framexm...tConstants.lua
  Reply With Quote
06-30-17, 12:49 AM   #3
arith
A Fallenroot Satyr
 
arith's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 29
Looks like the API PlaySoundKitID has been removed from 7.3.0
  Reply With Quote
06-30-17, 09:16 AM   #4
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 848
PlaySound() will now only accept soundkit IDs.
__________________
Knowledge = Power; Be OP
  Reply With Quote
06-30-17, 09:58 AM   #5
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 301
Originally Posted by arith View Post
Is it me or are there a few sounds missing from that list? (e.g., invite decline, quest failed, etc)
__________________
AddonsNEW Executive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
06-30-17, 10:50 AM   #6
galvin
A Cobalt Mageweaver
Join Date: Nov 2006
Posts: 214
Oh I see it doesn't take a path anymore but a number.

I take it this will break AceGUI-3.0-SharedMediaWidgets and LibSharedMedia?

Last edited by galvin : 06-30-17 at 11:01 AM.
  Reply With Quote
06-30-17, 11:06 AM   #7
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 301
They're fully converting to numbers from strings, not entirely unlike what they're trying with textures -- it looks like they retired the old PlaySound() and reused the name for PlaySoundKitID().

PlaySoundKitID() -- Removed
PlaySound() -- only accepts numbers
SOUNDKIT{} -- table with numbers, found in SoundKitConstants.lua (example linked in original post) (nb: it may not be complete)

Lua Code:
  1. PlaySound(1001)
or
Lua Code:
  1. PlaySound(SOUNDKIT.SOUNDKIT_TABLE_ENTRY)

For the most part, the SOUNDKIT entries are similar to the text names though with more underscores.

If you want to seamlessly update, you can do what arith pointed out in the latest Ace3:
Lua Code:
  1. PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856)
alternatively
Lua Code:
  1. PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
I've converted my code to the latter and it runs w/o error.
__________________
AddonsNEW Executive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
06-30-17, 11:37 AM   #8
galvin
A Cobalt Mageweaver
Join Date: Nov 2006
Posts: 214
What about custom sounds? weak auras, raven and other mods have a lot of those
  Reply With Quote
06-30-17, 02:03 PM   #9
MunkDev
An Onyxian Warder
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 355
Originally Posted by galvin View Post
What about custom sounds? weak auras, raven and other mods have a lot of those
http://wow.gamepedia.com/API_PlaySoundFile
__________________
  Reply With Quote

WoWInterface » PTR » PTR API and Graphics Changes » PlaySound() behavior changed in 7.3.0?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off