Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 169
delete a circular stream buffer — dx_CloseStreamBuffer( )
dx_CloseStreamBuffer( )
delete a circular stream buffer
!
!!
! Description
The dx_CloseStreamBuffer( ) function deletes the circular stream buffer identified by the stream
buffer handle. If the stream buffer is currently in use (playing), this function returns -1 as an error.
!
!!
! Cautions
You cannot delete a circular stream buffer while it is in use by a play operation. If you try to delete
the buffer in this situation, the dx_CloseStreamBuffer( ) function will return -1 as an error.
!
!!
! Errors
This function returns -1 on error. The error can occur if you passed the wrong buffer handle to the
function call or if the buffer is in use by an active play.
To see if the buffer is in use by an active play, call dx_GetStreamInfo( ) and check the item
“currentState” in the DX_STREAMSTAT structure. A value of ASSIGNED_STREAM_BUFFER
for this item means that the buffer is currently in use in a play. A value of
UNASSIGNED_STREAM_BUFFER means that the buffer is not being used currently in any play.
Unlike other voice API library functions, the streaming to board functions do not use SRL device
handles. Therefore, ATDV_LASTERR( ) and ATDV_ERRMSGP( ) cannot be used to retrieve
error codes and error descriptions.
Name: int dx_CloseStreamBuffer(hBuffer)
Inputs: int hBuffer
stream buffer handle
Returns: 0 if successful
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: streaming to board
Mode: synchronous
Platform: DM3
Parameter Description
hBuffer specifies the stream buffer handle obtained from
dx_OpenStreamBuffer( )