Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 357
reset internal data for a circular stream buffer — dx_ResetStreamBuffer( )
dx_ResetStreamBuffer( )
reset internal data for a circular stream buffer
!
!!
! Description
The dx_ResetStreamBuffer( ) function resets the internal data for a circular stream buffer,
including zeroing out internal counters as well as the head and tail pointers. This allows a stream
buffer to be reused without having to close and open the stream buffer. This function will report an
error if the stream buffer is currently in use (playing).
!
!!
! Cautions
You cannot reset or delete the buffer while it is in use by a play operation.
!
!!
! Errors
This function returns -1 when the buffer is in use by a play operation.
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.
!
!!
! Example
#include <srllib.h>
#include <dxxxlib.h>
main()
{
int nBuffSize = 32768;
int hBuffer = -1;
if ((hBuffer = dx_OpenStreamBuffer(nBuffSize)) < 0)
{
printf("Error opening stream buffer \n");
Name: int dx_ResetStreamBuffer(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 circular stream buffer handle