Thread Tools Display Modes
01-15-24, 01:17 AM   #1
Eommus
An Aku'mai Servant
Join Date: Apr 2017
Posts: 34
Using different sound files for certain effects

Hi,

Some years ago, the following was working, but it seems to no more:

To disable the sound effects that you hear when you select or deselect an NPC, I used to put two empty sound files like this

C:\World of Warcraft\_retail_\Sound\Interface\ideselecttarget.ogg
C:\World of Warcraft\_retail_\Sound\Interface\iselecttarget.ogg

But it's not working now, I still hear the select/deselect sound effects. Any ideas how to achieve what I want?

Thanks!
  Reply With Quote
01-16-24, 01:12 PM   #2
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 322
Have you tried this?
https://www.wowinterface.com/forums/...688#post325688

What you have to do is to find the event that happens when you select or deselect an NPC.
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
01-17-24, 01:46 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
The lines responsible for playing the target select and lost sounds are here
https://github.com/Gethe/wow-ui-sour....lua#L172-L178
https://github.com/Gethe/wow-ui-sour...Frame.lua#L258

There's also an API function for muting specific sounds by either path or FileID.
MuteSoundFile()

Taking the SoundKitIDs and looking up their FileIDs, these calls should do the trick.
Lua Code:
  1. MuteSoundFile(567453);
  2. MuteSoundFile(567520);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-17-24, 02:30 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
I have a feeling only calls to
Code:
PlaySoundFile
respect
Code:
MuteSoundFile
and not PlaySound.

But maybe that's a classic client quirk, I don't know how retail behaves.
  Reply With Quote
01-17-24, 02:55 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Considering MuteSoundFile() works for C-side calls too (you can mute creature sounds with it), I think it'll be fine.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-17-24, 03:01 PM   #6
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
This is what I use. It's to keep those pesky sounds from the YakVendor mount quiet.

Code:
local soundKitIDs = {
    640336, 640338, 640340,
    640314, 640316, 640318, 640320,
    640180, 640182, 640184,
    640158, 640160, 640162, 640164
}

local frame = CreateFrame("Frame")

frame:RegisterEvent("PLAYER_LOGIN")
frame:SetScript("OnEvent", function(self, event, ...)
    if event == "PLAYER_LOGIN" then
        for _, id in ipairs(soundKitIDs) do
            MuteSoundFile(id)
        end
    end
end)
  Reply With Quote
01-17-24, 03:54 PM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
In all honesty, you don't need to wait for events to fire to use MuteSoundFile(). You can call it from the main chunk. Also, SoundKitIDs can map to multiple FileIDs in which a random one is picked at call. They're not interchangeable.
Lua Code:
  1. for _,fileid in ipairs({
  2.     640336, 640338, 640340,
  3.     640314, 640316, 640318, 640320,
  4.     640180, 640182, 640184,
  5.     640158, 640160, 640162, 640164
  6. }) do MuteSoundFile(fileid); end
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-17-24, 05:43 PM   #8
Sharpedge
A Wyrmkin Dreamwalker
 
Sharpedge's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2022
Posts: 54
Originally Posted by SDPhantom View Post
In all honesty, you don't need to wait for events to fire to use MuteSoundFile(). You can call it from the main chunk. Also, SoundKitIDs can map to multiple FileIDs in which a random one is picked at call. They're not interchangeable.
Lua Code:
  1. for _,fileid in ipairs({
  2.     640336, 640338, 640340,
  3.     640314, 640316, 640318, 640320,
  4.     640180, 640182, 640184,
  5.     640158, 640160, 640162, 640164
  6. }) do MuteSoundFile(fileid); end
Ahh, ok. I will give that a shot. Thank you.
  Reply With Quote
01-19-24, 05:17 AM   #9
Eommus
An Aku'mai Servant
Join Date: Apr 2017
Posts: 34
Thank you all, using SDPhantom's code, I made a simple addon to mute those select/deselect sounds. I will be adding more sound IDs if/when I stumble into sounds I do not want to hear.

Though, I didn't quite understand how you take the SoundKitIDs and look up their FileIDs.

Last edited by Eommus : 01-19-24 at 05:25 AM.
  Reply With Quote
01-19-24, 05:23 PM   #10
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
There's a lookup table in the DBC files. Currently, WoW.Tools is the only site I can find with complete info though it's been discontinued since Dec 2022.

https://wow.tools/dbc/?dbc=soundkitentry
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-20-24, 04:55 AM   #11
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Originally Posted by SDPhantom View Post
There's a lookup table in the DBC files. Currently, WoW.Tools is the only site I can find with complete info though it's been discontinued since Dec 2022.

https://wow.tools/dbc/?dbc=soundkitentry
https://wago.tools/ is the spiritual successor.
  Reply With Quote
01-20-24, 08:44 AM   #12
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by Dridzt View Post
https://wago.tools/ is the spiritual successor.
It didn't have the SoundKitIDs listed when I tried to use it earlier.
Seems to be there now.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-20-24, 09:52 AM   #13
Eommus
An Aku'mai Servant
Join Date: Apr 2017
Posts: 34
Thanks a lot!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Using different sound files for certain effects


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