Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 49
get TDM bus time slot number of audio input transmit channel — ai_getxmitslot( )
!
!!
! Example
#include <windows.h>
#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;
}
!
!!
! See Also
ai_open( )
ai_close( )