t2:push_to_talk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

t2:push_to_talk [2019/11/19 20:39] (current)
J2Kbr created
Line 1: Line 1:
 +~~NOTOC~~
 +===== push_to_talk =====
 +----
 +push_to_talk - Enable or disable the headset MIC
  
 +==== Description ====
 +----
 +<code gpc2>​void push_to_talk(bool talk);</​code>​
 +
 +Enable or disable the controller headset MIC according the **talk** argument.
 +
 +==== Parameters ====
 +----
 +  * **talk**: ''​TRUE''​ for enable the headset MIC or ''​FALSE''​ to disable.
 +
 +==== Return Value ====
 +----
 +No value is returned. ​
 +
 +==== Examples ====
 +----
 +=== Example #1 push_to_talk() example ===
 +<code gpc2>​init {
 +    // Disable the headset MIC when the script is loaded
 +    push_to_talk(FALSE);​
 +}
 +
 +main {
 +    if(event_active(BUTTON_2)) {
 +        // Enable the headset MIC when the button is pressed
 +        push_to_talk(TRUE);​
 +    } else if(event_release(BUTTON_2)) {
 +        // Disable the headset MIC when the button is released
 +        push_to_talk(FALSE);​
 +    }
 +}</​code>​
t2/push_to_talk.txt · Last modified: 2019/11/19 20:39 by J2Kbr