User Manual

Table Of Contents
167
CATC MERLINS WAND 1.22 APPENDIX C
Users Manual Merlin’s Wand Scripting Commands
Return value
“Success”
“Failure”
“Not connected”
“No SCO connection”
Comments
This command is used to change gain of connected speaker or microphone.
In order to use this command, an SCO connection must exist.
Example
Main()
{
result = Connect('00803713BDF0');
Trace("Connection result : ", result, "\n");
if( result == "Success")
{
result = HCIAddSCOConnection( '00803713BDF0',
["HV1"]);
Trace("SCO Connection result : ", result, "\n");
if( result == "Success")
{
index = 0;
while(index < 16)
{
result = HCICatcChangeHeadsetGain("Speaker",
index);
Trace("Change speaker gain: ", result, "\n");
result = HCICatcReadHeadsetGain("Speaker",
index);
Trace("Read speaker gain: ", result, "\n");
index = index + 1;
Sleep(2000);
}
index = 0;
while(index < 16)
{
result =
HCICatcChangeHeadsetGain("Microphone", index);
Trace("Change microphone gain: ", result,
"\n");
result = HCICatcReadHeadsetGain("Microphone");
Trace("Read microphone gain : ", result, "\n");
index = index + 1;
Gain New gain of
the device
Values: 0 – 0xF
Parameter Meaning Default Value Comments