beautypg.com

Teledyne LeCroy BTTracer_Trainer - BTTrainer Users Manual User Manual

Page 166

background image

148

CATC BTT

RAINER

2.11

C

HAPTER

User’s Manual

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;

Sleep(2000);

}

status = HCIRemoveSCOConnection('00803713BDF0');

Trace("SCO disconnect result: ", status, "\n");

}