Quantcast
Channel: Plantronics Developer Connection: Message List
Viewing all articles
Browse latest Browse all 377

Audio to Earpiece

$
0
0

Hi,

 

At my company we've implemented a digital UHF radio system that ties into third party software, this software will allow us to use a push to talk feature with a microphone so we can talk to other users of UHF radios.

So what i've done was brought in some Plantronic wireless headsets and i've created a C# application ( with the help of examples shown on the forums ) so the users can use the wireless earpieces and push the call pickup button on the earpiece - the c# application see's the button press then activates the application window for the UHF radio and sends a keystroke for the Push to talk to activate.

the user then speaks, and once done they push the call/answer button on the earpiece again to stop the push to talk feature and this works perfectly fine.

 

However i want the users to be able to have audio through their earpiece at all times so they can hear the radio calls - if i set this up to have audio auto detect in the plantronics hub we hear the first call over the radio, however as soon as they push the call/answer button to answer the call from the radio system, when the person replies there is no audio coming through the earpiece,

the way i've found to get audio back is to play a windows sound and audio comes back and they can hear the next call on the radio system but then when they answer it with the button press they can't hear the reply again.

I was thinking it must be the call/answer button that is breaking the audio link?

So i was thinking once the user pushes the headset button that the c# application can send the command

1. m_spokes->ConnectAudioLinkToDevice(true); 

so the headset would re-engage audio to the earpiece?

i understand this will drain the battery a lot quicker but we don't mind.

i'm very new to c# so i dont know how to implement this code as it comes up with a syntax error when i type it in, can anyone assist me?

here is part of the code

 

static void m_spokes_ButtonPress(object sender, ButtonPressArgs e)

        {

            Console.WriteLine("Headset button was pressed: " + e.headsetButton.ToString());

            switch (e.headsetButton)

            {

                case Interop.Plantronics.DeviceHeadsetButton.HeadsetButton_Talk:

                    // this sets turbo net to be the active window and pushes the PTT button within the app ) 

                    Console.WriteLine("pushing A key for ptt in trbonet");

                    // command to select the window needed

                    Microsoft.VisualBasic.Interaction.AppActivate("TRBOnet.Enterprise v4.6 / Dispatch Console");

                    //command to do the keypress

                    InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_A);

                 

                    break;

            }

        }

 

thank you


Viewing all articles
Browse latest Browse all 377

Trending Articles