
Description | Example | See Also
Name: |
int ai_close(devh) | |
Inputs: |
int devh |
|
Returns: |
0 on success | |
Includes: |
dxxxlib.h | |
Category: |
Audio Input | |
Mode: |
synchronous | |
The ai_close( ) function closes an audio input device previously opened with the ai_open( ) function. This function releases the handle and breaks any link that the calling process has with the device through the handle.
Parameter |
Description |
devh |
Specifies the valid device handle obtained when an audio input device is opened with the ai_open( ) function. |
#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