
Description | Example | See Also
Name: |
int ai_getxmitslot(devh, sc_tsinfo) | |
Inputs: |
int devh |
|
SC_TSINFO* sc_tsinfo |
| |
Returns: |
0 on success | |
Includes: |
dxxxlib.h | |
Category: |
Audio Input | |
Mode: |
synchronous | |
The ai_getxmitslot( ) function provides the SCbus time slot number of the audio input transmit channel. The SCbus timeslot information is contained in an SC_TSINFO structure.
Parameter |
Description |
devh |
Specifies the valid device handle obtained when the audio input device is opened with the ai_open( ) function. |
sc_tsinfo |
Specifies a pointer to the SCbus timeslot information structure. The sc_numts member of the SC_TSINFO structure must be initialized with the number of SCbus time slots requested (1). The sc_tsarrayp member of the SC_TSINFO structure must be initialized with a valid pointer to a long variable. Upon successful return from the function, the long variable will contain the number of the SCbus time slot on which the audio input device transmits. |
#include <windows.h> /* Include in Windows applications only */
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
int main( )
{
int aidev; /* Audio input device handle */
SC_TSINFO sc_tsinfo; /* Time slot information structure */
long scts; /* TDM bus time slot */
/* Open audio input device aiB1 */
if ((aidev = ai_open("aiB1")) < 0) {
/* process error */
}
/* Fill in the TDM bus time slot information */
sc_tsinfo.sc_numts = 1;
sc_tsinfo.sc_tsarrayp = &scts;
/* Get TDM bus time slot connected to transmit of audio input device */
if (ai_getxmitslot(aidev, &sc_tsinfo) < 0) {
/* process error */
}
else {
printf("%s is transmitting on TDM time slot %d", ATDV_NAMEP(aidev), scts);
}
/* Close audio input device */
if (ai_close(aidev) < 0) {
/* process error */
}
return 0;
}
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation