after a longer time i have decided to rewrite the library to provide transparent layer over blizzard api.
I will try to hook ace event frame and call voice events in this fashion.
if AceEvent30Frame then
AceEvent30Frame:GetScript( "OnEvent" )( AceEvent30Frame, "VOICE_START", <unit> )
But i have encountered one small problem.For obvious reasons i am sending player names of the speaking players, but blizzards events fire with UnitID arguments.So i have a question. Is there a function to change playername to unitid? I guess that one playername can result in multiple unitids
and i will probably have to write it myself but i would like your thoughts about how to do this efficiently
Hi, i have finally achieved what i wanted and submitted libraidvoice for approval. Simple library that can be included in unitframes and used there.
example of addon that uses my library and prints speaking players (who have raidvoice)
function MyAddon:voiceUpdate(event, arg1)
--prints playername or nill if player stops speaking
If you are author of unitframe please do try it.You can make those speakers like in blizz interface now. I am expecting feedback.
I still dont see how he knows that someone is talking on the out-of-game voice-chat. I know its not impossible, just wondering how he did it.
I use 2 Things
1) push to talk key as mentioned by Adirelle
2) voice activated chat is made as follows:
User enables blizzard ingame chat and set activation volume
addon records loopback sound at regular intervals and reads microphone value
if value is above activation volume the user is speaking
Okay, I think i need to explain the purpose more thorouhly. My addon raidvoice can show people speaking on external voicechat if and only if the people have have my addon. The major drawback is that not many people do. In order to solve this problem I want to make this library that can be embedded into unitframes, so even people who do not have my addon will see people speaking and using my addon. This way if spreaded everybody should see someone speaking on voicechat.
I am not sure is it possible to send communication with AceComm from my addon and accept it in library without AceComm ?
Tainting is not a problem, it works pretty well.
P.S. I do use the push-to-talk mapping trick you mentioned but i went further and i support even voice activated chat with another trick :)
I have decided to make an library from my RaidVoice addon.
custom voice events
hooked UnitIsTalking global function
How it should work:
Library captures raidvoice addon communication a create voice events, that can be ebedded into other addons(like unitframes) and there you can use the global function to ask who is speaking over external voicechat.(Pretty much what raidvoice does)
Can somebody please anser me how...
1) to include AceComm into a Library ?
I need it to capture the communication on addon channel to create voice events