WowAddons

World of Warcraft Forever API · C_Sound.md, for your AI

C_Sound

6 functions, 2 events, 2 tables, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

C_Sound.GetSoundScaledVolume

scaledVolume = C_Sound.GetSoundScaledVolume(soundHandle)

Arguments

soundHandlenumber

Returns

scaledVolumenumber

C_Sound.IsPlaying

isPlaying = C_Sound.IsPlaying(soundHandle)

Arguments

soundHandlenumber

Returns

isPlayingbool

C_Sound.PlayItemSound

C_Sound.PlayItemSound(soundType, itemLocation)

Arguments

soundTypeItemSoundType
itemLocationItemLocation

C_Sound.PlaySound

success, soundHandle = C_Sound.PlaySound(soundKitID, [uiSoundSubType], [forceNoDuplicates], [runFinishCallback], [overridePriority], [volumeOverride])

May return nothing.

Arguments

soundKitIDnumber
uiSoundSubTypeUISoundSubType default "g_defaultSI3UISoundSubTypeForLua"
forceNoDuplicatesbool default false
runFinishCallbackbool default false
overridePrioritynumber may be nil
volumeOverridenumber may be nil

Returns

successbool
soundHandleSoundHandle

C_Sound.PlaySoundWithOptions

success, soundHandle = C_Sound.PlaySoundWithOptions(params)

May return nothing.

Arguments

paramsPlaySoundParams

Returns

successbool
soundHandleSoundHandle

C_Sound.PlayVocalErrorSound

C_Sound.PlayVocalErrorSound(vocalErrorSoundID)

Arguments

vocalErrorSoundIDVocalerrorsounds

Events

SOUND_DEVICE_UPDATE

No payload.

SOUNDKIT_FINISHED

soundHandlenumber

Tables

PlaySoundParams structure

soundKitIDnumber
uiSoundSubTypeUISoundSubType default "g_defaultSI3UISoundSubTypeForLua"
forceNoDuplicatesbool default false
runFinishCallbackbool default false
overridePrioritynumber may be nil
volumeOverridenumber may be nil

PlaySoundResult structure

successbool
soundHandleSoundHandle

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows