Table of Contents Index NMS Glossary Previous Page Next Page (Page 17 of 69 in this chapter) Version


adiGetRecordStatus

Description

Retrieves the record operation status.

Prototype

DWORD adiGetRecordStatus ( CTAHD ctahd,
ADI_RECORD_STATUS *info,
unsigned size )

ctahd CTA context handle returned by ctaCreateContext.

info Pointer to the ADI_RECORD_STATUS structure, as shown:

typedef struct

{ /* Parms related to RECORD functions: */

DWORD size ; /* Returned size (GetRecordStatus()) */

DWORD reason; /* Reason last record ended */

DWORD buffercount; /* Counter of buffers submitted */

DWORD frame /* Number of frames submitted */

DWORD totalbytes; /* Total bytes submitted */

void *buffer; /* Last buffer pointer SUBMITTED. */

DWORD bytecount; /* Number of bytes into this buffer */

DWORD bytesrecorded; /* Total bytes actually recorded. */

DWORD timestarted; /* Actual time started (ms units) */

DWORD underrun; /* Counts underrun events */

} ADI_RECORD_STATUS;

size Amount of memory available at info to receive the ADI_RECORD_STATUS.

Return Values

Events

None.

Details

This function retrieves status information about the active or most recently completed voice record operation for the specified CTA context.

Up to size bytes of the ADI_RECORD_STATUS structure are copied to the address pointed to by info. If size is greater than or equal to sizeof(ADI_RECORD_STATUS), the complete structure is copied. The number of bytes copied is returned in the ADI_RECORD_STATUS size field.

adiGetRecordStatus may be issued while actively recording. If there is no active record operation, the status information pertains to the most recently completed instance.

The ADI_RECORD_STATUS structure contains the following fields:
Field

Description

size

Number of bytes copied to status.

reason

Termination condition for the last ADIEVN_RECORD_DONE. This field is 0 if the record operation is active, or if it has not been started since the CTA context was last opened.

buffercount

Number of buffers submitted.

framecount

Number of voice frames submitted.

totalbytes

Number of bytes submitted by the application.

buffer

Last buffer pointer submitted.

bytecount

Size of the last buffer submitted.

bytesrecorded

Total number of bytes received.

timestarted

Timestamp for the start of the record operation (refer to adiGetTimeStamp).

underrun

Total number of underruns during the record instance (refer to the ADI Service Developer's Manual for more information about underruns).

See Also

adiStartRecording, adiRecordAsync, adiRecordToMemory, adiStopRecording

Example


void myShowRecordStatus( CTAHD ctahd )
{
    ADI_RECORD_STATUS recordstatus;

    adiGetRecordStatus( ctahd, &recordstatus, sizeof recordstatus );

    /* A termination condition of 0 indicates either record in progress,
     * or none yet started in this CTA context.
  */
    printf( "Termination condition=%x, bytes recorded=%d\n",
             recordstatus.reason, recordstatus.bytesrecorded );
}



Table of Contents Index NMS Glossary Previous Page Next Page (Page 17 of 69 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.