Intel 05-1832-002 IP Phone User Manual


 
348 Voice API for Windows Operating Systems Library Reference — November 2003
dx_reciottdata( ) — record voice data to multiple destinations
!
!!
! Cautions
On High Density Station Interface (HDSI) boards, this function is supported provided that the
correct play/record PCD file is downloaded.
On DM3 boards using a flexible routing configuration, voice channels must be listening to a
TDM bus time slot in order for any voice streaming functions, such as dx_rec( ), to work. In
other words, you must issue a dx_listen( ) function call on the device handle before calling any
voice streaming function for that device handle. Furthermore, the dx_listen( ) function must
be called within the same process as the voice streaming functions. The actual recording
operation will start only after the voice channel is listening to the proper external time slot.
All files specified in the DX_IOTT structure will be of the file format described in DX_XPB.
All files recorded to will have the data encoding and sampling rate as described in DX_XPB.
When playing or recording VOX files, the data format is specified in DX_XPB rather than
through the dx_setparm( ) function.
The DX_IOTT data area must remain in scope for the duration of the function if running
asynchronously.
The DX_XPB data area must remain in scope for the duration of the function if running
asynchronously.
The io_fhandle member of the DX_IOTT is normally set to the value of the descriptor
obtained when opening the file used for recording. That file cannot be opened in append mode
since multiple recordings would corrupt the file during playback because of different coders
used, header and other format-related issues. Consequently, when opening a file, the
O_APPEND flag is not supported and will cause TDX_ERROR to be returned if used.
!
!!
! Errors
In asynchronous mode, the function returns immediately and a TDX_RECORD event is queued
upon completion. Check ATDX_TERMMSK( ) for the termination reason. If a failure occurs
during recording, then a TDX_ERROR event will be queued. Use ATDV_LASTERR( ) to
determine the reason for error. In some limited cases such as when invalid arguments are passed to
the library, the function may fail before starting the record. In such cases, the function returns -1
immediately to indicate failure and no event is queued.
xpbp points to the I/O Transfer Parameter Block, DX_XPB, which specifies the file
format, data format, sampling rate, and resolution for I/O data transfer. For
more information on this structure, see Table , “DX_XPB”, on page 520.
mode Specifies the record mode:
EV_ASYNC – asynchronous mode
EV_SYNC – synchronous mode
PM_TONE – play 200 msec audible tone
RM_NOTIFY – generate record notification beep tone
Parameter Description