beautypg.com

ClearOne Writing StreamNet User Manual

Page 61

background image

Audio Driver Example

D-9

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.

-- since the Parasound Ztuner doesn't have a scan feature we will just call

our seek function

function handle_scan(command)

handle_seek(command)

end

-- function handle_preset(command)

-- Diego Alfarache

-- 09-20-2006

-- Receive and process #PRESET commands

function handle_preset(command)

if( command == nil ) then

return

end

local AsciiMessage = ""

local dir = command.params[1]:upper()

if( dir == "DN" ) then

AsciiMessage = "W 1 3 4%0D"

elseif( dir == "UP" ) then

AsciiMessage = "W 1 3 3%0D"

end

WriteMessage(AsciiMessage)

-- if we are a V1 we need to update the frequency

if( false == bIsV2 ) then

nRefreshFreqTimeout = 0

RefreshFrequency()

end

end

-- function handle_next(command)

-- Diego Alfarache

-- 09-20-2006

-- Receive and process #NEXT commands

function handle_next(command)

if( command == nil ) then

return

end