beautypg.com

Audio driver example, Parasound ztuner, Appendix – ClearOne Writing StreamNet User Manual

Page 53

background image

Audio Driver Example

D-1

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.

Appendix

D

Audio Driver Example

The following example audio and control drivers in commented code-form are
available as further resources.

All drivers can be found in your DigiLinX Dealer Setup folder under the ./upgrades/
[MM-DD-YYYY]/drivers/ folder. Open the .lua file with your preferred text editor to
see the complete commented code created by NetStreams engineers.

Parasound zTuner

-- zTuner.lua

-- driver for Parasound Ztuner V1 and V2

-- file version 1.0.0

-- There are many places where we check to see if we are a V1 or V2 tuner

since their protocols

-- are different. The V2 protocol is more straight forward than the V1 as

will be evident in

-- how much extra work is required to setup the outgoing tune commands and

with the extra work

-- required to know what piece of information we are currently expecting

back from the tuner

-- (this is the FREQUENCY_FIRST, LAST, BAND, etc stuff)

--

-- DigiLinX command handler:

--

-- function handle_band(command)

-- function handle_clear(command)

-- function handle_key(command)

-- function handle_next(command)

-- function handle_preset(command)

-- function handle_prev(command)

-- function handle_scan(command)

-- function handle_seek(command)

-- function handle_tune(command)

--

-- Other functions:

--

-- function CheckPower()

--

Send command to check power state of tuner

-- function OnAsyncInput(stream, message)