I have decided to make an library from my RaidVoice addon.
Key features:
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
Given that your library should only send simple "starts talking", "stops talking" events, I think you shouldn't embed AceComm. Your library should deal directly with addon communication.
Wouldn't hooking UnitIsTalking cause taint issues ? Moreover, why making it a library if your addon already hooks UnitIsTalking ? In other words, the purpose of turning it into a library would be to make it less intrusive. If your addon already pushes the functionality into other addons by hooking UnitIsTalking, turning it into a library is pointless (unless there are some drawbacks you didn't tell us about.)
I don't think so. The purpose of the addon is simply to show in game who is talking using push-to-talk button in an external voicechat (e.g. TeamSpeak or any other).
The trick is that if you map the push-to-talk key in WoW, it is received both by the voice-chat application and the WoW client. So you can catch the key events in WoW to emulate the built-in voice icon feature.
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 :)
The main issue I think is handling key bindings and/or any saved variables. Experience (LibGlory) has proven that doing this for a library in a clean way is almost impossible.
I do not want that in library, you missed my point, i only need to know how can addon and library communicate. I will write and example.
Player A:
has raidvoice addon -full functionality- he can broadcast and recieve voice event messages
Player B:
has some unitframe which supports my library(libRaidVoice) -works as reciever only- can accept voice events
Player B should be able to see player A speaking. If player B wants to be seen too he should get the raidvoice addon.
I only need to know if and how I can accept messages broadcasted from addon with aceComm to this library. Do I need to embedd aceComm there? If so then how?
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.
He said that above, he's using a key-bind inside WoW to detect push-to-talk situations,
and the in-game voice activation to detect the voice-activation situations.
(since out of game voice activation would trigger in-game voice activation if you have it enabled).
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
Ok. His question was how should he communicate over the addon channel, so he can do that directly from his library using SendAddonMessage() with "RAID" distribution. He can also register CHAT_MESSAGE_ADDON in his library in order to recieve any messages that are sent by other players
IMO a library using built-in settings (e.g. voice activation level and push-to-talk button) and mimicking built-in voice-chat methods and events should be quite straightforward to write. Obviously, the library should wrap built-in events and statuses so the addon would only use one entry point.
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)
RV =LibStub:GetLibrary("libRaidVoice-1.0");
RV.RegisterCallback(self,"RAIDVOICE_UPDATE","voiceUpdate")
function MyAddon:voiceUpdate(event, arg1)
print(arg1);
--prints playername or nill if player stops speaking
end
If you are author of unitframe please do try it.You can make those speakers like in blizz interface now. I am expecting feedback.
Hi,
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> )
end
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
I have decided to make an library from my RaidVoice addon.
Key features:
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
Wouldn't hooking UnitIsTalking cause taint issues ? Moreover, why making it a library if your addon already hooks UnitIsTalking ? In other words, the purpose of turning it into a library would be to make it less intrusive. If your addon already pushes the functionality into other addons by hooking UnitIsTalking, turning it into a library is pointless (unless there are some drawbacks you didn't tell us about.)
The trick is that if you map the push-to-talk key in WoW, it is received both by the voice-chat application and the WoW client. So you can catch the key events in WoW to emulate the built-in voice icon feature.
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 :)
Player A:
has raidvoice addon -full functionality- he can broadcast and recieve voice event messages
Player B:
has some unitframe which supports my library(libRaidVoice) -works as reciever only- can accept voice events
Player B should be able to see player A speaking. If player B wants to be seen too he should get the raidvoice addon.
I only need to know if and how I can accept messages broadcasted from addon with aceComm to this library. Do I need to embedd aceComm there? If so then how?
Your communication library should handle all communication without the use of acecomm.
He said that above, he's using a key-bind inside WoW to detect push-to-talk situations,
and the in-game voice activation to detect the voice-activation situations.
(since out of game voice activation would trigger in-game voice activation if you have it enabled).
Same trick in principle x2.
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
example of addon that uses my library and prints speaking players (who have raidvoice)
If you are author of unitframe please do try it.You can make those speakers like in blizz interface now. I am expecting feedback.
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.
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
Edit:I have came up with something like this:
http://paste.curseforge.com/3058/