Table of Contents Index NMS Glossary Previous Page Next Page (Page 10 of 11 in this chapter) Version


trauShowDSPInfo

Description

Retrieves information about AG TRAU channels running on a specified AG TRAU program.

Prototype

DWORD trauShowDSPInfo ( TRAUDSPID dspid,
TRAU_INFO *trau_info,
short
size )

dspid Resource identifier returned by trauLoad.

trau_info Pointer to the following structure:

typedef struct _TRAU_INFO

{

unsigned size; /* Size (determined by #chns */

CTAHD loadhd; /* Associated load handle */

unsigned type; /* Vocoder type */

unsigned max_channels; /* Max channels supported */

unsigned detached_channels; /* Number of detached chns */

unsigned frame_tic; /* tics in .25ms increments */

unsigned max_frame_size; /* Host-based:max chn frame */
/* size */
unsigned underrun_count_read; /* # of underruns up since */

/* LOAD_DONE event */

unsigned underrun_count_write; /* # of underruns down since */

/* LOAD_DONE event */
TRAU_CHN_INFO_DATA pChannel[MAX_CHANNELS_DSP];/* Chn info */

} TRAU_INFO;

The TRAU_CHN_INFO_DATA structure appears on the following page.

size Maximum size of the returned structure.


trauShowDSPinfo returns an array of TRAU_CHN_INFO_DATA substructures. Each substructure provides the following information for each channel running on the specified dspid:

typedef struct _TRAU_CHN_INFO_DATA

{

CTAHD ctahd; /* ctahd associated with */

/* this trauchn */

TRAU_STATE state; /* State of channel defined */

/* in TRAU_STATE */

unsigned chn_underrun_count_read; /* # of underruns up since */
/* LOAD_DONE event */

unsigned chn_underrun_count_write; /* # of underruns down */

/* since LOAD_DONE event */

DWORD bus; /* Bus used */

int pcm_stream_from_dsp; /* Stream used for voice PCM */

int pcm_stream_to_dsp; /* Stream used for voice PCM */

DWORD pcm_slot; /* PCM bus,stream,slot for */

/* voice data */

/* TX FUSION ONLY DATA FOLLOWS(set to 0 if HB) */

int tx_stream_from_dsp; /* Stream used for HDLC data */

/* from TX */

int tx_stream_to_dsp; /* Stream used for HDLC data */

/* to TX */

int tx_count; /* Number of bonded */

/* timeslots used */

DWORD tx_slot[ TX_MAX_SLOTS ]; /* Array of compressed */
/* timeslots */

} TRAU_CHN_INFO_DATA;

Return Values

Events

None.

Details

This function provides information about AG TRAU channels running on a specific AG TRAU program.

Upon return, the type field is set to the AG TRAU program type identified, and detached_channels is set to the number of available channels. The max_channels field indicates the number of channels supported by the AG TRAU program. It must be returned before an array of state elements can be allocated in the structure.

Underruns are gaps in the data sent to, or received from DSP programs. When the operating system does not allow the AG TRAU service to provide buffers to the AG driver in a timely manner, this can result in two types of underruns:

Each TRAU_CHN_DATA substructure indicates the ctahd of the described channel. If the channel has not been attached, the AG TRAU service assigns a NULL handle to its array element.

The TRAU_STATE field for each channel can return one of the following values:
Field

Description

TRAU_CHN_ON_LINE

Channel attached and enabled.

TRAU_CHN_OFF_LINE

Channel attached but not enabled.

TRAU_CHN_DETACHED

Channel not attached.

See Also

trauLoad



Table of Contents Index NMS Glossary Previous Page Next Page (Page 10 of 11 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.