Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Mutes a sound file.
MuteSoundFile(sound)
Arguments[]
- sound
- number|string - FileID of a game sound or file path to an addon sound.
Example
Plays the Sound/Spells/LevelUp.ogg sound
/run PlaySoundFile(569593)
Mutes it, the sound won't play
/run MuteSoundFile(569593); PlaySoundFile(569593)
Unmutes it and plays it
/run UnmuteSoundFile(569593); PlaySoundFile(569593)
Details[]
- Muted sound settings only persist through relogging and /reload. They have to be muted again after restarting the game client.
- This works on all internal game sounds, addon sounds and sounds played manually by PlaySoundFile()
- There is no API to replace sound files.
Finding Sound IDs[]
File Data IDs
- By file name/path, e.g. Spells/LevelUp,type:ogg in wow.tools
- By SoundKitID, e.g. skit:888 in wow.tools
- By sound kit name with https://wow.tools/files/sounds.php
Sound Kit Names/IDs
- From the sounds tab for an NPC, for example https://www.wowhead.com/npc=154304/waveblade-shaman#sounds
- By sound kit name with https://www.wowhead.com/sounds and SoundKitName.db2
- IDs used by the FrameXML are defined in the SOUNDKIT table
- The full list of IDs can be found in SoundKitEntry.db2
Addon example[]
Mutes the fizzle sounds.
local sounds = { 569772, -- sound/spells/fizzle/fizzleholya.ogg 569773, -- sound/spells/fizzle/fizzlefirea.ogg 569774, -- sound/spells/fizzle/fizzlenaturea.ogg 569775, -- sound/spells/fizzle/fizzlefrosta.ogg 569776, -- sound/spells/fizzle/fizzleshadowa.ogg } for _, fdid in pairs(sounds) do MuteSoundFile(fdid) end
Patch changes[]
Patch 8.2.0 (2019-06-25): Added. (Build 30948 Jun 27 2019)