7.3 Sound Problem
yoshimo opened this issue ยท 33 comments
Looks like they changed something with the soundsystem:
Date: 2017-08-26 19:19:33 ID: 8 Error occured in: Global Count: 1 Message: ...s\Bagnon\external\Wildpants\components\frameBase.lua line 17: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback]) Debug: [C]: PlaySound() ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: OnShow() ...s\Bagnon\external\Wildpants\components\inventory.lua:12: ...s\Bagnon\external\Wildpants\components\inventory.lua:11 [C]: Show() ..\FrameXML\UIParent.lua:2928: ShowUIPanel() ...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:54: ...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:50 (tail call): ? (tail call): ? ...s\Bagnon\external\Wildpants\features\autoDisplay.lua:133: ...s\Bagnon\external\Wildpants\features\autoDisplay.lua:131 [C]: ToggleBag() ..\FrameXML\MainMenuBarBagButtons.lua:21: BagSlotButton_OnClick() [string "*:OnClick"]:4: [string "*:OnClick"]:1 Locals: (*temporary) = "igBackPackOpen"
And what exactly is the problem? Thank you for just posting a statement. Sarcasm intended.
the problem is that the addon seems to be not working.
The only error i have is this.
That error is not the first one you had (ID 8 I see). You must scroll back to the first error, only the first is relevant (errors create further errors).
First and only error:
Message: ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
Time: 08/28/17 21:24:25
Count: 1
Stack: ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: Usage: PlaySound(soundKitID, optional["SFX","Music","Ambience", "Dialog" or "Master"], [forceNoDuplicates, runFinishCallback])
[C]: ?
[C]: in function PlaySound' ...s\Bagnon\external\Wildpants\components\frameBase.lua:17: in function
OnShow'
...s\Bagnon\external\Wildpants\components\inventory.lua:12: in function <...s\Bagnon\external\Wildpants\components\inventory.lua:11>
[C]: in function Show' Interface\FrameXML\UIParent.lua:2928: in function
ShowUIPanel'
...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:54: in function <...ace\AddOns\Bagnon\external\Wildpants\core\frames.lua:50>
(tail call): ?
...s\Bagnon\external\Wildpants\features\autoDisplay.lua:157: in function `ToggleAllBags'
[string "OPENALLBAGS"]:1: in function <[string "OPENALLBAGS"]:1>
Locals:
PlaySound no longer takes strings, only ids, so you have to change to them.
https://www.townlong-yak.com/framexml/ptr/SoundKitConstants.lua
As far as I can tell the 'BAGMENUBUTTONPRESS' (used at line 104 of the bag.lua sound no longer exists in the current sound kit, or if it does it is named something different so I used the Backpack Open sound.
I changed to the following and on the ptr it seems to work fine:
Bagnon\external\Wildpants\components\bag.lua
Line 84:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
Line 104:
PlaySound(117) -- BAGMENUBUTTONPRESS
Line 252:
PlaySound(SOUNDKIT.IG_MAINMENU_OPEN)
Bagnon\external\Wildpants\components\frameBase.lua:
Lines 10 & 11:
Frame.OpenSound = SOUNDKIT.IG_BACKPACK_OPEN
Frame.CloseSound = SOUNDKIT.IG_BACKPACK_CLOSE
Bagnon_Config\common\libs\Sushi-3.0\Classes\ButtonBase.lua
Line 23:
Button.sound = SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
Bagnon_Config\common\libs\Sushi-3.0\Classes\CheckButton.lua
Line 52-54:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
else
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)
Bagnon_Config\common\libs\Sushi-3.0\Classes\ColorPicker.lua
Line 85:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
Bagnon_Config\common\libs\Sushi-3.0\Classes\DropdownFrame.lua
Line 124:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
Bagnon_Config\common\libs\Sushi-3.0\Classes\TextureDropdown.lua
Line 156:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON)
Bagnon_GuildBank\components\frame.lua
Line 14&15
Frame.CloseSound = SOUNDKIT.GUILD_VAULT_CLOSE
Frame.OpenSound = SOUNDKIT.GUILD_VAULT_OPEN
Bagnon_GuildBank\components\moneyFrame.lua
Line 38:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION)
Line 48:
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION)
Bagnon_VoidStorage\components\dialogs.lua
Line 18:
PlaySound(SOUNDKIT.UI_VOID_STORAGE_UNLOCK)
Bagnon_VoidStorage\components\frame.lua
Line 15&16"
Frame.OpenSound = SOUNDKIT.UI_ETHEREAL_WINDOW_OPEN
Frame.CloseSound = SOUNDKIT.UI_ETHEREAL_WINDOW_CLOSE
Looks like there are multiple instances of PlaySound across 11 files, a good chunk is in the library Sushi-3.0.
Expanding on @Stanzilla :
frameBase.lua line 17
Frame.OpenSound = SOUNDKIT.IG_BACKPACK_OPEN
Frame.CloseSound = SOUNDKIT.IG_BACKPACK_CLOSE
The playsound function doesn't use strings anymore, so the soundkit file carries their number as a part of the structure. (883 and 884 i think).
Been a while since i've coded. Commented on Curse forums aswell, fixed for me.
Yep, the soundkit. would be the better way (did the fast and easy #'s at first), updated my comment above with the more long term SOUNDKIT. piece until @Jaliborc updates the addon.
I would have done a PR, but was pressed for time due to some RL appointments and work. Looks like @theisencr is doing up some of them.
With the "I am not a WoW addon developer" disclaimer... all of the pull requests have been generated for each of the individual projects (including the libs in @Knaledge's comment) based on @Torsin's comment. Updated a few other places in the libs to SOUNDKIT, but I confess I probably wasn't thorough; just simple string searches.
BagnonPatched.zip
Here is a patched version with the changes above applied to the most recent version of Bagnon. Just unzip in WoWHome/Interface/addons
Thank you, @yinzara. That worked perfectly.
I didn't do a code review, though, so I hope it's not logging my keystrokes or something. :)
Also @yinzara TYVM!!! I did check code, didnt' see any major issues, but not enough to make promises!
Thanks @theisencr.. I was about to offer to do it, but realised you're on top of it :)
@theisencr - looking good for the commons/externals. The next PR would be changes to the Bagnon-specific components themselves (i.e. patching Wildpants, patching Sushi-3.0, and then patching Bagnon itself).
Once those PRs on Wildpants/Sushi get approved/merged, the packaged version of Bagnon (here) would be updated to include those new versions of Wildpants/Sushi - and then the changes to Bagnon itself committed and merged into that new "branch". That PR gets submitted, approved, merged, and then made public.
@Knaledge pretty sure all those PRs are already there.
So far, frameBase.lua was the only thing throwing an error for me. I looked up and used the numbers and it works. I will keep your list handy in case I throw more errors so I can grab them as they happen. Too lazy to dig through them all with all these demons to kill!
I hear ya @auddie2015 , seems like most of the other ones surround the settings sounds and the void storage/guild bank.
EDIT: Was going to submit pull request(s) to fix but ran out of time before raid, sorry. Hopefully someone can package up a fix for people tonight.
Anyone looking to make the PR: @Torsin @comp615 @theisencr (and for completeness, @Jaliborc) - If a PR is submitted, it may be worth submitting to each individual project, then anyone using those libs may benefit:
- WildPants changes: https://github.com/tullamods/Wildpants
- Sushi-3.0 changes: https://github.com/Jaliborc/Sushi-3.0
It's likely they would be back-ported from this project back upstream to those commons, though doing that directly would probably make life a bit easier.
Just realized the zip file done by @yinzara used my comment with the numbers instead of the soundkit.values, also changed to use 117 for the dragging sound then packaged it up:
Bagnon_73_Ready.zip
Also you can just use https://mods.curse.com/addons/wow/275697-playsound-temporal-fix until your addons are updated.
Looks like the latest update fixed everything, but the Guild Bank:
Bagnon_GuildBank/components/frame.lua has these values:
Frame.CloseSound = 'GuildVaultClose'
Frame.OpenSound = 'GuildVaultOpen'
Whereas it should be these:
Frame.CloseSound = SOUNDKIT.GUILD_VAULT_CLOSE
Frame.OpenSound = SOUNDKIT.GUILD_VAULT_OPEN
Same with Bagnon_VoidStorage\components\frame.lua:
Frame.OpenSound = 'UI_EtherealWindow_Open'
Frame.CloseSound = 'UI_EtherealWindow_Close'
It should be:
Frame.OpenSound = SOUNDKIT.UI_EtherealWindow_Open
Frame.CloseSound = SOUNDKIT.UI_EtherealWindow_Close