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


adiSubmitPlayBuffer

Description

Submits a buffer of data for a play operation initiated by calling adiPlayAsync.

Prototype

DWORD adiSubmitPlayBuffer ( CTAHD ctahd,
void *buffer,
unsigned size,
unsigned flags)

ctahd CTA context handle returned by ctaCreateContext.

buffer Pointer to buffer containing voice data to be played.

size Size of buffer (bytes).

flags Set to ADI_PLAY_LAST_BUFFER if the given buffer is the last in the message; otherwise, set to 0.

Return Values

Events

Details

This function allows the application to asynchronously submit buffers, provided that the:

The bufsize can be arbitrarily large but must be an integral multiple of framesize bytes for the selected encoding. For optimum performance, the bufsize should be the largest frame multiple that will fit in one AG board buffer. You can obtain this size by calling adiGetEncodingInfo (refer to the maxbufsize argument). If bufsize is less than or equal to the board buffer size, you can re-use the buffer as soon as this function returns.

Refer to the ADI Service Developer's Manual for details concerning asynchronous play operations.

Note: buffer can be set to NULL and size set to 0 only if the ADI_PLAY_LAST_BUFFER flag is set. In this case, the play operation will terminate when the previously submitted buffer finishes.

See Also

adiPlayAsync, adiStopPlaying, adiGetPlayStatus

Example

Refer to the playrec demonstration program.



Table of Contents Index NMS Glossary Previous Page Next Page (Page 66 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.