Thread Tools Display Modes
06-27-11, 10:13 AM   #1
madanasta
A Murloc Raider
Join Date: Jun 2011
Posts: 4
Zone music filename currently playing

Hi all

I was wondering if anyone can think of a way to get the filename of the zone music file currently playing (e.g., have it displayed on the client or have it printed out as a result of some macro call). I can't seem to be able to find info on neither events being fired when a sound file starts/stops playing (which makes sense, I guess) nor some API call that would return that information. Any ideas?

Thanks in advance

m
  Reply With Quote
06-27-11, 10:52 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You could always look here: http://www.wowinterface.com/download...Cataclysm.html
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-27-11, 11:38 AM   #3
madanasta
A Murloc Raider
Join Date: Jun 2011
Posts: 4
While undoubtedly a useful list, I'm not sure if it can help me.

m
  Reply With Quote
06-27-11, 12:31 PM   #4
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
No API to get the "currently playing" music BUT you could if the game uses the normal API calls to play music override the PlayMusic like:

Code:
local played = {}
local orig = PlayMusic
function PlayMusic(file, ...)
  table.insert(played, file)
  return orig(file, ...)
end
The table bottom result (like "played[#played]") is always the current playing file.
  Reply With Quote
06-27-11, 12:44 PM   #5
madanasta
A Murloc Raider
Join Date: Jun 2011
Posts: 4
Very interesting! Thanks, I will try that.

m
  Reply With Quote
06-27-11, 03:21 PM   #6
madanasta
A Murloc Raider
Join Date: Jun 2011
Posts: 4
Well, I overrode PlayMusic (as well as PlaySound and PlaySoundFile just to be on the safe side) and confirmed that my version is indeed running when I manually call it... but, unfortunately, the client does not seem to use it when playing zone music (even though calling PlayMusic will make zone music playback stop, so I guess it is the same audio playback infrastructure that's used in both cases). In any case, it was an interesting idea, thanks .

m
  Reply With Quote
06-27-11, 04:43 PM   #7
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I was afraid of that, the game usually uses their own interface hence we can't override the "core" version of the API but only the front end one that the interface uses, usually any API used in FrameXML can be overridden (and broken if secure/protected).
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Zone music filename currently playing


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