• 0

    posted a message on Seeking support for my voice library
    Quote from Adirelle

    If it happens that several addons uses your library and all of them use AceTimer to do the voice check activation, the code will be run far more often that you'd like. Handling this inside the library ensure this won't happen.

    Moreover, as an addon author myself, I'd expect that a library make my life simplier and doesn't require a lot of effort to make it working. Ideal I would just drop the file in my addon, load it from the ToC and have it working. That's especially true for libraries that provides optional features.


    Fair enough.

    I am still quite new to the concept of making wow addons and never bitter to learn a thing or two.

    Then I have an other question, is it possible to see here at curseforge what projects use my library? I am curious to see what addons will accept it.
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    You have gotten me wrong. I do not want to use ace timer in library, i want to let addon authors to use acetimer if they want, because then there is only one place where code (even if a few lines) is executed frequently.

    Sorry about the code formatting if than is what you mean by identation, the code looks a bit different in my kwrite, maybe some sort of autoformatting of the paste? Anyway...
    http://paste.wowace.com/zp3cyql4g0i2nd1t/
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Your timer is something very much alike i used in raidvoice before i switched to aceTimer. I think using ace timer is preferable here, because calling function 60 times per second is not very neat. Newertheless I included my version that supports both and has editable update period. Yes you are right i dont like your comm protocol i think i will stick to mine. In RaidVoice addon everything that starts with ! is a command and is dispatched as such and ignored if unknown, thats why i the test for ! is neccesery, everything else is displayed directly. I might have mentioned that these are not all comm commands i use.


    http://paste.wowace.com/bu45qyi0htvkwdml/
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Quote from Tekkub
    Oh right, this only recently cropped up didn't it? I don't really do comm in many addons anymore so I've never run into issues.


    With the patch 3.2 the hell broke loose ;)
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Quote from Tekkub

    You don't need to test for a raid or party, just send comm to group and let the game deal with it.


    Well thats not entirely true. If you are in BG and not in raid or party it would cause the send message to fail, spamming the chat pretty terribly I experienced it with my raidvoice addon.

    like this then?

    http://paste.wowace.com/wkz6tp7o0bdx25gf/

    and what about the hooking then?
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Ok here i go again, i included the broadcasting feature even the voice activation, here have a look, i will upload it on curseforge when i test it for bugs...

    http://paste.wowace.com/b69z4ielwuvdo7jp/
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Quote from DathRarhek
    Using acecomm is bad because it imposes the additional inclusion of that library when you want to use your library. Other addon developers don't like this. Additionally you're not really doing anything with acecomm that warrants the use of it.

    Your RaidVoice addon should also not use acecomm. In my opinion LibRaidVoice should contain a UnitStartsTalking and UnitStopsTalking function that RaidVoice uses to communicate.

    This means that LibRaidVoice does all communication (and essentially replaces acecomm).


    Okay i will re-write it very much like you say, with the exception that playername will be included in library so it will me more likely PlayerStartsTalking() PlayerStopsTalking(). I will get back to you when i have new version.
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    oh crap, thaks i always overlooks the little differences in lua, null and nil more often, i should not be writing code in kwrite probably :)
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Thanks for many responses I will have to think about it for some time. For now i will answer some of your questions.

    I have a problem with the default api. In general it is too broad. In parts there are places that should be avoided, because the api uses ingame channels to transmit voice information and you have to be in that channel and have voicechat enabled. The default implementation also transmits information every 1.5s or so. Player started speaking and stopped speaking. I on the other hand transmitt only change of state e.g Player started speaking and clear all speaking players (if more are speaking they are retransmitted). The reason i did not include broadcasting voice events is that i have not yet decided how to port it in library. I do not want to implement keybinding or some parts of voice activation into the library because it would not be easily shared and managable from other addons and would require saving variables. I could provide function that sends the apropriate message saying this player is speaking and leave keybinding and stuff to addon, but that would require me to make sure same player isnt broadcasted multiple times, and moving some more parts from raidvoice into the library and propably make some documentation on how to include keybinding and voice activation in your addons. There are some more subtle points, as most of my raidvoice addon users who have keybinding have blizzard voicechat disabled as it is not needed and those who use voiceactivation must have it enabled. For this reason i manually disable the blizz speaker plate to unify the interface, as i do not like it, it could be diffucult to handle it as its functions are based on some assuptions regarding from where the voice information are comming and what must be enabled. Lastly i want to provide this library as a way for other people to provide custom visualization of speaking players thats the primary reason, i do not want to force them into the blizz frame. I decided to start with something easy and then gradually adding on what others will require, broadcasting is the next logical step, but first i will try to perfect this code and think how to approach things, i do not want to make this library too big or hard to use. I like the power of simplicity, for now it is very easy to use.

    And why is using AceComm bad idea? I thought it would be bad idea not to recieved it with acecomm when i use acecomm in raidvoice to broadcast?

    P.S. I am a Java programmer i hate C :)

    P.P.S I will definitely make some changes in due time, and return back with new code when i have time. (Not using the word "soon" as it is trademarked by blizz) :)

    Oh i forgot important thing, if you use the default api, with enabled voicechat within ingame channells there is no way you can stop wow from broadcasting your voice to other players, yes you can mute yourself but then you can measure the sound volume, there is always a lot to consider.....
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Okay, this is the entire lib code, it has only about 100 lines, interesting parts are RV:VoiceEvent(arg1,arg2)
    where selected subset of raidvoice addon communication is captured and then the final part where UnitIsTalking is hooked. I am prepared to make any modification to the code if need be...

    Currently the communication on addon channel goes like this:

    Player A starts speaking A is sent
    Player B starts speaking B is sent
    Player B stops speaking !CLEAR is sent
    Player A captures !CLEAR and if he is still speaking he sents A again
    finally !CLEAR is sent to notify that Player A stopped talking

    In this way communication is fail-safe and you are not stuck with player names that were disconnected when speaking.

    The PING and PONG commands are used to query addon/library version and in future could be used to see who can see you speaking.


    I think this part of code is a nice start and if people are interested in this library i might port into it other raidvoice features like custom guild voice channels with renamable names ....

    local MAJOR, MINOR = "libRaidVoice-1.0", 1;
    local RV = LibStub:NewLibrary(MAJOR, MINOR);
    
    
    if not RV then return end -- No upgrade needed
    
    if not RV.frame then
      RV.frame=CreateFrame("Frame");
    end
    
    
    local voiceTable= {};
    local newTalker ;
    local item ;
    local unit;
    local raidVoiceVersion = MAJOR.."."..MINOR;
    
    
    RV.events = RV.events or 
     LibStub:GetLibrary("CallbackHandler-1.0"):New(RV);
    
    
    RV.CommHandler =  RV.CommHandler or LibStub("AceComm-3.0"):Embed(RV);
    
    
    local oldUnitIsTalking = UnitIsTalking;
    
    -----------------------------------------------------------------------------------------------------
    -- use RV.RegisterCallback(self, "eventName"[, method, [arg]]) ; 
    -- to register recieve voice events
    -- example:
    
    --RV =LibStub:GetLibrary("libRaidVoice-1.0");
    --RV.RegisterCallback(self,"RAIDVOICE_UPDATE","voiceUpdate")
    			 	
    
    --function MyAddon:voiceUpdate(arg1,arg2)
    
    --print(arg2);
    --print(UnitIsTalking(arg2));
    
    --end
    --------------------------------------------------------------------------------------------------------
    
    function RV:VoiceEvent(arg1,arg2)
    
    
    if string.find(arg2, "!") == null then
    		RV:AddTalker(arg2);
    		RV.events:Fire("RAIDVOICE_UPDATE",arg2);
    else
    
    	if arg2 == "!CLEAR" or arg2 == "" or arg2 == nil then
    	   RV:ResetTalkers();
    	   RV.events:Fire("RAIDVOICE_UPDATE",nil);
    	end
    
    
    	if arg2 == "!PING"  then
    		if (RaidVoice == nil) then CommHandler:SendCommMessage( "RAIDVOICE", "!PONG;"..playerName..";0;"..raidVoiceVersion, "WHISPER",arg4 );end
        end
        if arg2 == "!GPING"  then
    		if (RaidVoice == nil) then CommHandler:SendCommMessage( "RAIDVOICE", "!GPONG;"..playerName..";0;"..raidVoiceVersion, "WHISPER",arg4 );end
        end
    
    
    end
    
    
    
    
    
    end
    
    
    RV.CommHandler:RegisterComm("RAIDVOICE", "VoiceEvent");
    
    
    
    function RV:AddTalker(talker)
    
    newTalker = true;
    
    	for idx=1, #(voiceTable)+1 do
    		item =  voiceTable[idx];
    		if item == talker then 
    				newTalker = false;
    				break;
    		end
    	end	
    	if newTalker == true  then
    		for idx=1, #(voiceTable)+1 do
    			item =  voiceTable[idx];	
    				if item == nil then 
    				voiceTable[idx] = talker;
    				break;
    			end
    		end
    	end
    
    end
    
    function RV:ResetTalkers()
          wipe(voiceTable);
    end	
    
    
    -- hooked global function answering voice statuses from local cache
    UnitIsTalking =function(...)
    
    	unit = ... ;
    	
    	if (voiceTable==nil or unit == nil) then 
    		return  oldUnitIsTalking(...);
    	end
    	
    	
    	for idx=1, #(voiceTable)+1 do
    		item =  voiceTable[idx];
    		if item == unit then 
    				return 1;
    		end
    	end
    
    	return oldUnitIsTalking(...);
    	
    end
    Posted in: Addon Ideas
  • 0

    posted a message on Seeking support for my voice library
    Hi I am Starouscz,
    author of addon RaidVoice that provides in-game names of players that are speaking over external voicechat (TS/Ventrillo) to WoW. In my addon both push-to-talk and and voice activated chat are supported. The only downfall is that all players are required to use this addon to see each other.

    In order to spread these custom voice events i made a very simple library that accepts voice events from players with RaidVoice and can be included in other addons. I am now seeking support from authors of unitframes and other addons to integrate my library. In the first beta of libRaidVoice library you can register callback that tells you who is speaking. With this information you shoul be able to add any speakers or any custom visualization of your liking.

    If you notify me that you use libRaidVoice i will make a list of addons that supports it and I would be happy if you spread the word too.
    Posted in: Addon Ideas
  • 0

    posted a message on LibRaidVoice
    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.
    Posted in: Libraries
  • 0

    posted a message on LibRaidVoice
    Quote from sylvanaar
    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
    Posted in: Libraries
  • 0

    posted a message on LibRaidVoice
    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?
    Posted in: Libraries
  • 0

    posted a message on LibRaidVoice
    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 :)
    Posted in: Libraries
  • To post a comment, please or register a new account.