ClearOne Writing StreamNet User Manual
Page 69

Audio Driver Example
D-17
All specifications subject to change without notification. All rights reserved. Copyright © 2007 NetStreams
Main +1 512.977-9393 / fax +1 512.977.9398 / Toll Free Technical Support +1 866-353-3496
3600 W. Parmer Lane, Suite 100; Austin, TX 78727 /
www.netstreams.com.
-- function RefreshFrequency()
-- Diego Alfarache
-- 09/21/2006
--
function RefreshFrequency()
-- Ignore commands if we are waiting on a response
if(nResponseTimeout ~= 0) then
return
end
if( false == bIsV2 ) then
WriteMessage("R 1 6%0D")
nExpectedRX = FREQUENCY_FIRST;
nResponseTimeout = 5
nRefreshFreqTimeout = 5
else
RequestV2Status()
end
end
-- function SendPower(bOn)
-- Diego Alfarache
-- 09/21/2006
--
function SendPower( bOn )
debug("warning", "Setting Power state to %d", bOn)
local szPower = ""
local nPower = 0;
if( true == bOn ) then
nPower = 1
end
szPower = string.format("W 1 1 %d%%0D", nPower)
WriteMessage(szPower)
nRefreshPowerTimeout = 5;
nRefreshFreqTimeout = 6;
end