WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   PlaySoundFile, not working anymore? (https://www.wowinterface.com/forums/showthread.php?t=5168)

Anarchos 06-21-06 03:38 PM

PlaySoundFile, not working anymore?
 
Hi,..

This is a lil bit of a mod I use to notify me when my "nightfall" aura is on myself. (A warlock thing). Anyhow, as you can directly see, it simple places a text message in chat, and more importantly plays a short .wav file.

Well,.. Here recently, I'm not quite sure if it was the 1.11 patch or not, it has not been playing the sound. Nothing has changed, except I added a line or two or code for testing purposes.

Here is the code.

Code:

function NightfallProc_onLoad()
        this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS");
        DEFAULT_CHAT_FRAME:AddMessage("NightfallProc Version 1 loaded.");
end

function NightfallProc_onEvent(event)
                if (arg1 == "You gain Shadow Trance.") then                       
                      DEFAULT_CHAT_FRAME:AddMessage("Testing, Next should be sound, then Nightfall!, then Sound");
                        PlaySoundFile("Interface\\AddOns\\NightfallProc\\cpi.wav");
                        DEFAULT_CHAT_FRAME:AddMessage("Nightfall!");
                        PlaySoundFile("Interface\\AddOns\\NightfallProc\\cpi.wav");
                end;
end

Now the result from that code is *now* simple "Testing, Next should be sound, then Nightfall!, then Sound. (Next chat line) "Nightfall!"

With no sound played!

Two things, it worked fine before the patch, so it makes me believe that for some reason "PlaySoundFile" doesn't work?

Any ideas on how to get this working, it was a HUGE part of the way I play.

Thank you so much,

Logdan 06-21-06 03:40 PM

http://forums.worldofwarcraft.com/th...p=1#post398491

Anarchos 06-21-06 03:47 PM

Thanks -- So it is "Broken".. =/

I noticed PlaySound() is reported to work..

Could I work that into this script?

There has to be a reason for the "File" end of the call command so I'd think PlaySound() wouldn't be able to pull from a pre-set file?

Any workarounds?

Thanks

Iriel 06-21-06 03:58 PM

The 'workaround' is to wait patiently for 1.11.1

Until then I suspect there's nothing we can do.

Anarchos 06-21-06 05:05 PM

Quote:

Originally Posted by Iriel
The 'workaround' is to wait patiently for 1.11.1

Until then I suspect there's nothing we can do.

I see -- So no work around using the API PlaySound() ?

There is a default sound the game plays for the aura I am speaking of,.. (My Nightfall Aura), Would there be a way to tap into this and get it to play a different soundfile?

Thanks,


All times are GMT -6. The time now is 06:06 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI